Release Date: Unreleased
4.8.0 release of CodeIgniter4
- TBD
- Commands: The
filter:checkcommand now requires the HTTP method argument to be uppercase (e.g.,spark filter:check GET /instead ofspark filter:check get /). - Filters: HTTP method matching for method-based filters is now case-sensitive. The keys in
Config\Filters::$methodsmust exactly match the request method - (e.g.,
GET,POST). Lowercase method names (e.g.,post) will no longer match.
- Filters: HTTP method matching for method-based filters is now case-sensitive. The keys in
- Testing: Tests using the
FeatureTestTraitmust now use uppercase HTTP method names when performing a request when using thecall()method directly - (e.g.,
$this->call('GET', '/path')instead of$this->call('get', '/path')). Additionally, setting method-based routes usingwithRoutes()must also use uppercase method names (e.g.,$this->withRoutes([['GET', 'home', 'Home::index']])).
- Testing: Tests using the
- NOTE: If you've implemented your own classes that implement these interfaces from scratch, you will need to
- update your implementations to include the new methods or method changes to ensure compatibility.
- Security: The
SecurityInterface'sverify()method now has a native return type ofstatic.
- CodeIgniter: The deprecated parameters in methods have been removed:
CodeIgniter\CodeIgniter::handleRequest()no longer accepts the deprecated$cacheConfigand$returnResponseparameters.$cacheConfigis no longer used and is now hard deprecated. A deprecation notice will be triggered if this is passed to the method.$returnResponseis now removed since already deprecated and unused.- The updated method signature is now
handleRequest(?RouteCollectionInterface $routes, ?Cache $cacheConfig = null).
CodeIgniter\CodeIgniter::gatherOutput()no longer accepts the deprecated$cacheConfigparameter.- As this is the first parameter, custom uses of this method will need to be updated to remove the parameter.
- Config:
CodeIgniter\Config\Services::request()no longer accepts any parameter.
- Autoloader: Removed the following deprecated methods:
CodeIgniter\Autoloader\Autoloader::sanitizeFileName()CodeIgniter\Autoloader\Autoloader::discoverComposerNamespaces()
- Bootstrap: The deprecated system/bootstrap.php file has been removed.
- Cache: Removed the following methods deprecated since v4.6.0:
CodeIgniter\Cache\Handlers\FileHandler::writeFile()CodeIgniter\Cache\Handlers\FileHandler::deleteFile()CodeIgniter\Cache\Handlers\FileHandler::getDirFileInfo()CodeIgniter\Cache\Handlers\FileHandler::getFileInfo()
- CLI: Removed the following properties and methods deprecated:
CodeIgniter\CLI\BaseCommand::getPad()CodeIgniter\CLI\CLI::$readline_supportCodeIgniter\CLI\CLI::$wait_msgCodeIgniter\CLI\CLI::isWindows()CodeIgniter\CLI\GeneratorTrait::execute()
- CodeIgniter: Removed the following properties and methods deprecated:
CodeIgniter\CodeIgniter::$cacheTTLCodeIgniter\CodeIgniter::$returnResponseCodeIgniter\CodeIgniter::initializeKint()CodeIgniter\CodeIgniter::detectEnvironment()CodeIgniter\CodeIgniter::bootstrapEnvironment()CodeIgniter\CodeIgniter::forceSecureAccess()CodeIgniter\CodeIgniter::displayCache()CodeIgniter\CodeIgniter::cache()CodeIgniter\CodeIgniter::cachePage()CodeIgniter\CodeIgniter::generateCacheName()CodeIgniter\CodeIgniter::displayPerformanceMetrics()CodeIgniter\CodeIgniter::determinePath()CodeIgniter\CodeIgniter::callExit()CodeIgniter\Test\MockCodeIgniter::callExit()
- Config: Removed the following property deprecated:
CodeIgniter\Config\BaseService::$services(deprecated since v4.5.0)
- Debug: Removed the following properties and methods deprecated since v4.4.0:
CodeIgniter\Debug\Exceptions::$ob_levelCodeIgniter\Debug\Exceptions::$viewPathCodeIgniter\Debug\Exceptions::determineView()CodeIgniter\Debug\Exceptions::render()CodeIgniter\Debug\Exceptions::collectVars()CodeIgniter\Debug\Exceptions::maskSensitiveData()CodeIgniter\Debug\Exceptions::maskData()CodeIgniter\Debug\Exceptions::cleanPath()CodeIgniter\Debug\Exceptions::describeMemory()CodeIgniter\Debug\Exceptions::highlightFile()
- Exceptions: Removed the following static constructors of
FrameworkExceptionand its child classes: CodeIgniter\Exceptions\DownloadException::forCannotSetCache()CodeIgniter\Exceptions\FrameworkException::forMissingExtension()CodeIgniter\Honeypot\Exceptions\HoneypotException::forNoHiddenValue()CodeIgniter\HTTP\Exceptions\HTTPException::forInvalidSameSiteSetting()CodeIgniter\Security\Exceptions\SecurityException::forInvalidSameSite()CodeIgniter\Session\Exceptions\SessionException::forInvalidSameSiteSetting()
- Exceptions: Removed the following static constructors of
- Filters: Removed the following properties and methods deprecated:
CodeIgniter\Filters\Filters::$arguments(deprecated since v4.6.0)CodeIgniter\Filters\Filters::$argumentsClass(deprecated since v4.6.0)CodeIgniter\Filters\Filters::getArguments()(deprecated since v4.6.0)
- Security: Removed the following properties and methods deprecated:
CodeIgniter\Security\SecurityInterface::sanitizeFilename()(deprecated since v4.6.2)CodeIgniter\Security\Security::sanitizeFilename()(deprecated since v4.6.2)CodeIgniter\Security\Security::$csrfProtection(deprecated since v4.4.0)CodeIgniter\Security\Security::$tokenRandomize(deprecated since v4.4.0)CodeIgniter\Security\Security::$tokenName(deprecated since v4.4.0)CodeIgniter\Security\Security::$headerName(deprecated since v4.4.0)CodeIgniter\Security\Security::$expires(deprecated since v4.4.0)CodeIgniter\Security\Security::$regenerate(deprecated since v4.4.0)CodeIgniter\Security\Security::$redirect(deprecated since v4.4.0)CodeIgniter\Security\Security::$sameSite(deprecated since v4.4.0)
- Added new
timezoneoption to connection array inConfig\Databaseconfig. This ensures consistent timestamps between model operations and database functions likeNOW(). Supported drivers: MySQLi, Postgre, and OCI8. See :ref:`database-config-timezone` for details.
- Added new
chunkRows()method toCodeIgniter\Modelfor processing large datasets in smaller chunks.
- :doc:`Array Helper </helpers/array_helper>` gained five new dot-path functions: :php:func:`dot_array_has()`, :php:func:`dot_array_set()`, :php:func:`dot_array_unset()`, :php:func:`dot_array_only()`, and :php:func:`dot_array_except()`.
- Added
SSEResponseclass for streaming Server-Sent Events (SSE) over HTTP. See :ref:`server-sent-events`. Responseand its child classes no longer requireConfig\Apppassed to their constructors.- Consequently,
CURLRequest's$configparameter is unused and will be removed in a future release.
- Removed deprecated language keys tied to removed exception constructors:
Core.missingExtension(FrameworkException::forMissingExtension())HTTP.cannotSetCache(DownloadException::forCannotSetCache())HTTP.invalidSameSiteSetting(HTTPException::forInvalidSameSiteSetting())Security.invalidSameSite(SecurityException::forInvalidSameSite())Session.invalidSameSiteSetting(SessionException::forInvalidSameSiteSetting())
See the repo's CHANGELOG.md for a complete list of bugs fixed.