data-id="1190000004868218">
After comprehensively considering the wishes and opinions of the community, we also did some thinking about what kind of future is most suitable for CI. Then, the CI Council made some decisions about the future of the framework. decision making. As a preview, there will be major changes in the future, but we believe they will not only prepare us for the future, but also maintain the consistent characteristics of CodeIgniter - simplicity, speed and flexibility.
This article is a simple overview of the future. Remember, this is just the initial plan. Any information is subject to change as development proceeds.
Core Changes
The PHP community has changed dramatically since the first version of CodeIgniter was released. Many of the core elements of CodeIgniter were necessary at the time, but when PHP5 was released, almost nothing at the core of CodeIgniter changed. If CodeIgniter wants to continue to perform at a high level and solidify its position among PHP frameworks in the future, big changes are necessary.
This means the system must be completely rewritten. The new CI will be developed in a separate code base to maintain code clarity. We envision reusing some previous code, but focusing on modern clear code.
Since we are targeting PHP 7, PHP 5.6 has entered security maintenance mode and will be completely discontinued in a few months. CI will not release a new version for a PHP version that is about to end support. We know that host environments vary widely, and some programs may not fully support PHP 7, so the 3.x branch will continue to be maintained for a while - much longer than the EOL period of the 2.x branch after 3.x is released.
Both the application and system directories will support PSR-4 autoloading. CodeIgniter will use its own autoloader and will integrate with Composer.
We will encapsulate some components so that they can be used in projects outside of CodeIgniter in most cases.
Packages/Modules
We will discard the concepts of application packages and modules. No need to panic! Because you can handle most situations with namespaces - at least for controllers and models. For others such as views, configuration files, and helpers, we believe we can make these things support namespaces. You can also put all package functionality and module routing capabilities into any directory by telling the autoloader how to find them.
Routing
Routing functionality will be updated. The "magic routing" feature that maps URIs directly to controllers/methods can be turned off, allowing you to choose your preferred routing method. In the routing configuration file you can choose to use "magic routing" or specify each route individually.
Improved logging system
The logging system will be improved, but the specific details have not yet been determined.
Testing
We will continue to use PHPUnit for testing. This also means you'll need to test the application yourself, but we'll get you the tools you need.
Backwards Compatibility
As mentioned above, this must be a version that is incompatible with older versions. We think this should be the best future for the framework. We have been laying the groundwork for this major change for many years, and we will try to make the transition as smooth as possible, but it remains to be seen how modernized the code base we can provide.
We will do our best to maintain the features that have made CodeIgniter popular for many years, namely fast, simple and "elegant".
Development Timetable
The entire development process will be divided into three phases.
The following class libraries will be removed from the kernel and will be downloaded on demand: typesetting class, FTP class, ZIP class and XML-RPC class.
The shopping cart class, Javascript class, unit test class and Trackback class will be deleted.
We expect to complete an Alpha version with a basic kernel within a year. After that, we will focus on improving the kernel and developing the remaining packages. The exact timeline may vary because, like most open source projects, it depends on the quantity and quality of community contributions, as well as the time and energy of core developers.
Phase 1
The first phase will focus on grabbing the most important parts of the framework. This will be the basis for the rest of the framework. They include:
Autoloader
Dependency Injection
Logging
Exception Handling
HTTP Request/Response Layer (or Input/Output)
Routing
Controller
Model
Database layer
Configuration
Security
The second phase
The focus of the second phase is to improve some classes and features that CodeIgniter users love to see . They include:
Helper
Language/Internationalization Features
Caching
Encryption
Form Validation
Image processing library
Pagination
Upload classes
Session
View
Debugging and analysis tools
The third phase - Optional class library
The third phase will mainly be used to expand optional software Bag. At this point in time, the framework should be ready for release without waiting for all libraries to be ready.
FTP
XML-RPC
Zip
Typesetting Class
Template Parser
We are excited about the new opportunities that the framework has ushered in , and eagerly hope The framework takes the first step towards a new version. Stop watching from the sidelines, come and build the future of frameworks.
The above introduces the CodeIgniter 4 recommended roadmap, including codeigniter content. I hope it will be helpful to friends who are interested in PHP tutorials.