user_guide_src/source/changelogs/v4.0.5.rst
Release Date: January 31, 2021
4.0.5 release of CodeIgniter4
.. contents:: :local: :depth: 2
url_to() which creates absolute URLs based on controllers.$useAutoIncrement which when set to false allows you to provide your own primary key for each record in the table. Handy when we want to implement 1:1 relation or use UUIDs for our model.url_is() which allows you to check the current URL to see if matches the given string.Lax.Config\Mimes::guessExtensionFromType() now only reverse searches the $mimes array if no extension is proposed (i.e., usually not for uploaded files).UploadedFile::getClientExtension() for UploadedFile::getExtension() and '' for UploadedFile::guessExtension()). This is a security fix and makes the process less dependent on the client.FileHandler now allows setting the file permissions mode via Config\Cache.BaseCommand::getPad() in favor of BaseCommand::setPad().CodeIgniter\Controller::loadHelpers() in favor of helper() function.Config\Format::getFormatter() in favor of CodeIgniter\Format\Format::getFormatter()CodeIgniter\Security\Security::CSRFVerify() in favor of CodeIgniter\Security\Security::verify()CodeIgniter\Security\Security::getCSRFHash() in favor of CodeIgniter\Security\Security::getHash()CodeIgniter\Security\Security::getCSRTokenName() in favor of CodeIgniter\Security\Security::getTokenName()Config\App::$CSRFTokenName in favor of Config\Security::$tokenNameConfig\App::$CSRFHeaderName in favor of Config\Security::$headerNameConfig\App::$CSRFCookieName in favor of Config\Security::$cookieNameConfig\App::$CSRFExpire in favor of Config\Security::$expireConfig\App::$CSRFRegenerate in favor of Config\Security::$regenerateConfig\App::$CSRFRedirect in favor of Config\Security::$redirectConfig\App::$CSRFSameSite in favor of Config\Security::$samesitemigrate:create command in favor of make:migration command.CodeIgniter\Database\ModelFactory in favor of CodeIgniter\Config\Factories::models()CodeIgniter\Config\Config in favor of CodeIgniter\Config\Factories::config()CodeIgniter\HTTP\Message::getHeader() in favor of header() to prepare for PSR-7CodeIgniter\HTTP\Message::getHeaders() in favor of headers() to prepare for PSR-7Config\Cache::$storePath in favor of Config\Cache::$file['storePath']Entity class where declaring class parameters was preventing data propagation to the attributes array.encryption.key has changed. Previously, explicit function calls, like getenv('encryption.key') or env('encryption.key') where the value has the special prefix hex2bin: returns an automatically converted binary string. This is now changed to just return the character string with the prefix. This change was due to incompatibility with handling binary strings in environment variables on Windows platforms. However, accessing $key using Encryption class config remains unchanged and still returns a binary string.Config\Services (in app/Config/Services.php) now extends CodeIgniter\Config\BaseService to allow proper discovery of third-party services.See the repo's
CHANGELOG_4.0.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/changelogs/CHANGELOG_4.0.md>_
for a complete list of bugs fixed.