CodeIgniter 4.x New Features

February 24, CodeIgniter 4 was officially launched. The long-awaited update, which is actually a new framework, was launched today in honour of James Perry, who was responsible for conducting this new project and who died a few weeks ago victim lung cancer
Completely written in PHP 7, the new version has a leaner coding than the previous ones, besides being more performative and giving developers more productivity and performance in the web application development process.
With a more organized and current code structure in relation to other frameworks on the market, such as Laravel, the use of new features in PHP 7 and other libraries is possible, sometimes requiring minimal configurations.
The migration process from version 3 to 4 is very easy to do, as long as the application to be migrated is within the standard architecture model of CodeIgniter 3.
Core Features of CodeIgniter
- CI is an MVC framework with a small footprint.
- Codeigniter gives exceptional performance.
- This is an MVC framework with zero configuration.
- No command-line configuration setup or dependencies installation to start(Optional).
- CI is not restricted to any naming convention or coding rules.
- No need to learn about advanced concepts like PEAR.
- You do not need to learn template engine rendering.
- Simple, Clear and easy to understand documentation.
Features of Codeigniter 4.x
- The earlier versions of Codeigniter are based on PHP 5.6 or lower but the Codeigniter 4 will be featured with PHP 7.2 functionality and compatibility.
- It required the *intl* extension of PHP installed on the server.
- If we would like to use CURLRequest, we will need lib curl installed.
- Supported databases are:
- MySQL (5.1+) via the MySQLi driver
- PostgreSQL via the Postgre driver
- SqLite3 via the SQLite3 driver
- CodeIgniter 4 can also be used with command-line programs. As per the latest trend, most of the frameworks provide CLI usability and library. Since Codeigniter 4.x the framework will also be providing CLI interfaces for different purposes.
- The following PHP extensions should be enabled on your server:
- Php-JSON
- Php-mbstring
- Php-mysqlnd
- Php-xml
- If you want to use CURLRequest in your CI application, you will need to install libcurl.
- The framework now provides for a public folder, intended as the document root for your app
Directory Structure for Codeigniter 4.x
A newly installed application has six directories:
- application
- system
- public
- writable
- tests
- Docs
Application Structure
- The framework still has app and system folders, with the same interpretation as before
- The framework now provides for a public folder, intended as the document root for your app
- There is also a writable folder, to hold cache data, logs, and session data
- The application folder looks very similar to that for CI3, with some name changes, and some subfolders moved to the writable folder
- There is no longer a nested application/core folder
The application directory i.e. app is the source code of your application. All the stuff done by you will remain here. The default structure of the app directory is as :
/app
/Config Stores the configuration files
/Controllers Controllers determine the program flow
/Database Stores the database migrations and seeds files
/Filters Stores filter classes that can run before and after a controller
/Helpers Helpers store collections of standalone functions
/Language Multiple language support reads the language strings from here
/Libraries Useful classes that don’t fit in another category
/Models Models the database and business logic.
/ThirdParty ThirdParty libraries that can be used in application
/Views Views make up the HTML that is displayed to the client.
Upcoming article :: implement unit testing with Codeigniter

My Publis article List