Version 4.7.5
Release Date: Unreleased
4.7.5 release of CodeIgniter4
BREAKING
Message Changes
Added the
Cookie.invalidCookieValuelanguage string.Added the
Cookie.invalidCookiePathlanguage string.Added the
Cookie.invalidCookieDomainlanguage string.
Changes
Response:
setJSON()andsetXML(), and theFormatterInterface::format()contract implemented byJSONFormatterandXMLFormatter, now type their body/data parameter asmixedinstead ofarray|object|string, matching what they already accepted at runtime (e.g., scalars andbool).
Deprecations
Debug Toolbar: Deprecated the unused
CodeIgniter\Debug\Toolbar\Collectors\Views::$viewsproperty.
Bugs Fixed
CLI: Fixed a bug where pressing backspace in a
CLI::prompt()erased the prompt text when thereadlineextension is enabled. The prompt is now passed toreadline()so line redraws repaint it. ANSI color codes in the prompt (e.g., option defaults) are wrapped in readline’s non-printing markers under GNU readline so cursor positioning stays accurate. On Windows, where thereadlineextension is built on WinEditLine, the prompt is written to STDOUT first because WinEditLine reports no library version and prints ANSI sequences literally.CLIRequest: Fixed a bug where
parseCommand()could throw a TypeError whenargvis missing.CodeIgniter: Fixed a bug where
gatherOutput()could be called twice whenstartController()returned aResponseInterface(e.g., from filter attributes or closure routes).Content Security Policy: Fixed a bug where empty
Content-Security-Policy,Content-Security-Policy-Report-Only, andReporting-Endpointsresponse headers were generated when no corresponding values existed.Cookie: Fixed a bug where
Cookieinstances created withraw: trueallowed invalid characters in cookie values rejected bysetrawcookie().Cookie: Fixed a bug where
Cookieinstances allowed invalid characters in path, domain, and prefix attributes rejected bysetcookie()andsetrawcookie().Database: Fixed a bug where rebuilding a SQLite3 table (e.g.,
Forge::dropColumn(),Forge::modifyColumn(),Forge::dropForeignKey()andForge::dropPrimaryKey()) corrupted the table names referenced by its foreign keys whenDBPrefixwas set.Files: Fixed a bug where
File::move()andUploadedFile::move()set executable and overly permissive file permissions (0777 & ~umask()instead of0666 & ~umask()), andUploadedFile::move()targeted the parent directory instead of the destination file forchmod().Helpers: Fixed a bug where
get_dir_file_info()returned incomplete entries for subdirectories and missing files instead of omitting them.Honeypot: Fixed a bug where bot detection returned an HTTP 500 response instead of 403 (Forbidden).
I18n: Fixed a bug where
Time::today(),Time::yesterday(), andTime::tomorrow()ignored the specified$timezoneandsetTestNow()when calculating the day.Logger: Fixed a bug where interpolating a log message with array or non-stringable context values could raise PHP warnings or errors.
Cache: Fixed
MemcachedHandler::decrement()initializing a non-existent counter to the positive offset. Missing counters are now initialized to0, reflecting Memcached’s unsigned, saturating counter semantics.
See the repo’s CHANGELOG.md for a complete list of bugs fixed.