Skip to content
Edit this page

Version 4.1.5

Release Date: November 8, 2021

4.1.5 release of CodeIgniter4

BREAKING

  • Fixed a bug in CSRF protection. Now CSRF protection works on PUT/PATCH/DELETE requests when the CSRF filter is applied. If you use such requests, you need to send the CSRF token.
  • In the previous version, if you didn't provide your own headers, CURLRequest would send the request-headers from the browser, due to a bug. As of this version, it does not send them.
  • Fixed BaseBuilder::insertBatch() return value for testMode. Now it returns an SQL string array instead of the number of affected rows. This change was made to maintain compatibility between the return types of batch methods. Now the returned data type for BaseBuilder::insertBatch() is the same as for the updateBatch() method.
  • Major optimizations have been made to the way data is processed in BaseBuilder::insertBatch() and BaseBuilder::updateBatch() methods. This resulted in reduced memory usage and faster query processing. As a trade-off, the result generated by the $query->getOriginalQuery() method was changed. It no longer returns the query with the bound parameters, but the actual query that was run.

Enhancements

  • Added Cache config for reserved characters
  • The addForeignKey() function of the Forge class can now define composite foreign keys in an array
  • The dropKey function of the Forge class can remove a key
  • Now _ can be used as a separator in environment variables. See Namespace Separator.
  • Added multiple filters for a route and classname filters
  • Reduced memory usage of insertBatch() and updateBatch()
  • Added Session-based CSRF Protection
  • Added valid_url_strict rule for Validation
  • Debug Toolbar
    • Added formatted query string to timeline
    • Improved keyword highlighting and escaping of query strings

Changes

  • Always escape identifiers in the set, setUpdateBatch, and insertBatch functions in BaseBuilder.

Deprecations

  • Deprecated CodeIgniter\\Cache\\Handlers\\BaseHandler::RESERVED_CHARACTERS in favor of the new config property

Bugs Fixed

See the repo's CHANGELOG_4.1.md for a complete list of bugs fixed.