Version 4.0.4¶
Release Date: July 15, 2020
4.0.4 release of CodeIgniter4
BREAKING¶
- Added an
$argumentsparameter toafter()andbefore()inFilterInterface. This is a breaking change, so all code implementing theFilterInterfacemust be updated.
Enhancements¶
- The location for the SQLite3 database has changed and will now be located by default in a writable/ folder instead of the public/ folder.
- New CLI command:
cache:clearthat will destroy all data within the current cache engine. - Thanks to samsonasik, we have several libraries brought up to 100% test coverage.
- A few small performance increases. Every ounce matters!
getFieldData()in the database results class now returns column type and length.- Default .htaccess file updated to work better with extended characters.
- New Testing Feature: Fabricator makes creating mock classes simple and repeatable in your tests.
- Model class can now have the callbacks overridden at runtime. Useful for testing.
- A number of improvements to Feature Tests in general.
- New command() helper function to programmatically run your CLI commands. Useful for testing and cron jobs.
- New command,
make:seederto generate a Database Seed class skeleton file. - Colors now available on the CLI within Windows, as well as other Windows-related CLI improvements.
- New helper mb_url_title() that functions like
url_title()but automatically escapes any extended URL characters. - Image library now supports
webpimages. - Added Unicode support for regular expressions in the Router.
- Added support for removing hidden folders in the delete_files() helper.
fetchGlobal()in the Request class now supports applying filters to arrays of data, not just the first item.filevalidation now works with arrays of files.- URI class now supports a
setSilent()method that will disable the throwing of Exceptions. - New argument to
URI::getSegment()that allows us to change the default value returned if nothing exists. - Implemented
withResource()in Image so that you can use method chaining instead of using the providedgetResource()(used in tests) to just compress your image. - Cookies and headers can be copied from the global Response object when doing a redirect using the new
withCookies()andwithHeaders()methods. - Support for the special prefix "hex2bin:" which can be used with the
$keyparameter in the Encryption class or in the .env file.
Bugs Fixed¶
- Fixed location for the SQLite3 database, which will now be located by default in a
writablefolder instead of thepublicfolder. - Fixed bug where
force_https()could addhttps://a second time. - Fixed a bug with CurlRequest that could result in incorrect "100 Continue" headers.
Image::save()bug fixed when$targetparameter wasnull.- Fixes for
set_checkbox()andset_radio()when the$defaultparameter is set totrue. - Fix for result object handling in the Model class.
- Fixed the escape character in the SQLite database.
- Fix for inserts on Postgres and Entities when the primary key was null.
- CLI scripts can now correctly recognize dashes within arguments.
- CURLRequest now properly sets content length with multipart data.
- Misc. stability improvements for the ImageMagick handler.
- Setting validation errors within a config file should now work.
- Unicode characters are not escaped when saving JSON from Entities.
- Redirecting with a custom HTTP code should work correctly now.
Time::setTimezone()now works correctly.- Added full outer join support for Postgres.
- Some cast items in the Entity (like array, json) were not being set correctly during a
fill()process. - Fixed bug in Image GD handler that would try to compress images twice in certain cases.
- Ensured that the translation output logic works on the selected locale, dashed locale, and fallback "en".
- Fixed
is_unique/is_not_uniquevalidation called on POST/PUT via API in PostgreSQL. - Fixed a bug where filter arguments were not passed to
after().
See the repo's CHANGELOG_4.0.md for a complete list of bugs fixed.