Table of Contents
核心变化
包/模块
路由
改进的日志系统
测试
向后兼容性
开发时间表
第一阶段
第二阶段
第三阶段 - 可选类库
Home Backend Development PHP Tutorial CodeIgniter 4 宣布开发路线图

CodeIgniter 4 宣布开发路线图

Jun 20, 2016 pm 12:33 PM

我们综合考虑了社区的愿望和意见后,也对什么样的未来对 CI 是最合适的做了一些思考,然后,CI 理事会对框架的未来做出了一些决策。预告一下,未来将会有重大变化,但我们相信他们不仅为我们的未来做准备,也会保持 CodeIgniter 的一贯特点 - 简洁、快速和灵活。

这篇文章是对未来的一个简单概述。请记住,这仅仅是最初的计划。任何信息都可能会随着开发的进行而发生变化。

核心变化

从 CodeIgniter 第一版发布以来,PHP 社区发生了巨大变化。CodeIgniter 的许多核心要素在当时是必须的,但当 PHP5 发布后,CodeIgniter 的核心几乎没有任何变化。如果未来 CodeIgniter 想要继续保持高水准并巩固其在 PHP 框架中的地位,则必须进行大改变。

这意味着系统必须全部重写。新的 CI 将在独立的代码库中开发以保持代码的清晰。我们设想会复用一些以前的代码,但重点是 现代的 清晰的代码。

自从我们以 PHP 7 为目标以来,PHP 5.6 已进入安全维护模式,并将在几个月后完全停止支持。CI 暂时不会为一个即将停止支持的 PHP 版本发布新版本。我们知道主机的环境千差万别,那么一些程序可能就无法完全支持 PHP 7,所以 3.x 分支将继续维护一段时间 - 将远远长于 3.x 发布后的 2.x 分支的 EOL 时限。

application 和 system 目录都将支持 PSR-4 自动加载。CodeIgniter 将使用自己的自动加载器,并将会整合 Composer。

我们将封装一些组件,以便在大多数情况下可以用于 CodeIgniter 以外的项目。

包/模块

我们将丢弃应用程序包和模块的概念。不必惊慌!因为你可以用名字空间来处理大多数情况 - 至少控制器和模型是这样的。对于其他的例如视图、配置文件和 Helper 等,我们相信可以让这些东东支持名字空间。你也可以把所有包的功能和模块的路由能力放到任意目录中,只需告诉自动加载器如何找到他们。

路由

路由功能将被更新。URI 直接映射到控制器/方法这个『魔术路由』功能将可关闭,以便让你选择自己喜欢的路由方式。在路由配置文件中你可以选择使用『魔术路由』或者单独指定每个路由。

改进的日志系统

日志系统将被改进,但具体细节尚未确定。

测试

我们将继续使用 PHPUnit 做测试。这也意味着你需要自己测试应用程序,但我们将为你准备好所需的工具。

向后兼容性

正如上面讲到的那样,这一定是一个和老版本不兼容的版本。我们认为这应该是框架最好的未来。对于这次的重大变化,我们已经做了很多年的基础工作,我们将尽可能的使过渡更平滑,但是对于我们能提供一个怎样的现代化的基础代码仍有待观察。

我们将尽最大努力保持让 CodeIgniter 多年来流行的特性,即快速、简洁和『优雅』。

开发时间表

整个开发过程将分为三个阶段。

下列类库将从内核删除,改为按需下载:排版类、FTP 类、ZIP 类和 XML-RPC 类。

购物车类、Javascript 类、单元测试类和 Trackback 类将被删除。

我们期望在一年内能完成一个内核基本成型的 Alpha 版本。之后,我们将把重点放在改进内核与开发剩余软件包的工作中。确切的时间表可能会有所不同,因为,与大多数开源项目一样,这取决于社区贡献的数量与质量,以及核心开发者的时间和精力。

第一阶段

第一阶段将侧重于抓住框架最重要的部分。这将是框架其他部分的基础。他们包括:

  • 自动加载器

  • 依赖注入

  • 日志

  • 异常处理

  • HTTP 请求/应答层(或输入/输出)

  • 路由

  • 控制器

  • 模型

  • 数据库层

  • 配置

  • 安全

第二阶段

第二阶段的重点是完善一些 CodeIgniter 用户喜闻乐见的类和特性。他们包括:

  • Helper

  • 语言/国际化特性

  • 缓存

  • Email

  • 加密

  • 表单验证

  • 图像处理类库

  • 分页

  • 上传类

  • Session

  • 视图

  • 调试和分析工具

第三阶段 - 可选类库

第三阶段将主要用来扩充可选软件包。在这个时间点,框架应该可以发布了,不需要等到所有类库都准备就绪。

  • FTP

  • XML-RPC

  • Zip

  • 排版类

  • 模板解析器

框架迎来了新的机遇使我们很兴奋,并迫不及待的希望框架为新版迈出第一步。不要在一旁围观了,赶快来构筑框架的未来吧。

作者: Lonnie Ezell (CodeIgniter 理事会成员)

翻译: Hex

原文发表于 2015 年 8 月 5 日 ,截止目前 CI 4 正在开发中,尚未发布

英文原文: CodeIgniter 4 Proposed Roadmap

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1663
14
PHP Tutorial
1266
29
C# Tutorial
1239
24
Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Apr 08, 2025 am 12:03 AM

There are four main error types in PHP: 1.Notice: the slightest, will not interrupt the program, such as accessing undefined variables; 2. Warning: serious than Notice, will not terminate the program, such as containing no files; 3. FatalError: the most serious, will terminate the program, such as calling no function; 4. ParseError: syntax error, will prevent the program from being executed, such as forgetting to add the end tag.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? Apr 09, 2025 am 12:09 AM

HTTP request methods include GET, POST, PUT and DELETE, which are used to obtain, submit, update and delete resources respectively. 1. The GET method is used to obtain resources and is suitable for read operations. 2. The POST method is used to submit data and is often used to create new resources. 3. The PUT method is used to update resources and is suitable for complete updates. 4. The DELETE method is used to delete resources and is suitable for deletion operations.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

Explain the difference between self::, parent::, and static:: in PHP OOP. Explain the difference between self::, parent::, and static:: in PHP OOP. Apr 09, 2025 am 12:04 AM

In PHPOOP, self:: refers to the current class, parent:: refers to the parent class, static:: is used for late static binding. 1.self:: is used for static method and constant calls, but does not support late static binding. 2.parent:: is used for subclasses to call parent class methods, and private methods cannot be accessed. 3.static:: supports late static binding, suitable for inheritance and polymorphism, but may affect the readability of the code.

How does PHP handle file uploads securely? How does PHP handle file uploads securely? Apr 10, 2025 am 09:37 AM

PHP handles file uploads through the $\_FILES variable. The methods to ensure security include: 1. Check upload errors, 2. Verify file type and size, 3. Prevent file overwriting, 4. Move files to a permanent storage location.

See all articles