Version 4.0.5

Release Date: Not released

 

4.0.5 release of CodeIgniter4

Enhancements:

  • New URL helper function url_to() which creates absolute URLs based on controllers.
  • New Model option: $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.
  • New URL helper function url_is() which allows you to check the current URL to see if matches the given string.
  • Services now have their config parameters strictly typehinted. This will ensure no one will pass a different config instance. If you need to pass a new config with additional properties, you need to extend that particular config.
  • Support for setting SameSate attribute on Session and CSRF cookies has been added. For security and compatibility with latest browser versions, the default setting is Lax.

Bugs Fixed:

  • Fixed a bug in Entity class where declaring class parameters was preventing data propagation to the attributes array.
  • Handling for the environment variable 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.

Deprecations:

  • Deprecated BaseCommand::getPad in favor of BaseCommand::setPad.
  • Deprecated Config\Format::getFormatter in favor of CodeIgniter\Format\Format::getFormatter
https://www.vanwijheweb.nl/codeigniter_user_guides/gebruikers_gids_4.X/changelogs/v4.0.5.html