Repository navigation
Releases
CakePHP 5.4.4
The CakePHP core team is happy to announce the immediate availability of CakePHP 5.4.3. This is a maintenance release for the 5.4 branch that fixes security issues, community reported issues, regressions. The security fixes have also been released as 5.2.16, 5.3.8. Security advisories will be released in the upcoming days as they are assigned CVE numbers.
Bugfixes
You can expect the following changes in 5.4.4. See the changelog for every commit.
- Added PHP 8.6 to the CI matrix.
- Improved test coverage for global functions.
- Improved behavior of
hasTable()with MySQL and missing schema. - Fix crash when fallback loader is used for missing domain files.
- Improved API documentation.
- Fix
Hash::extract()treating the path0as empty. - Fix double identifier quoting on
DISTINCTexpressions. SmtpTransportnow closes the connection when a send fails.XmlViewnow serializes an empty array as an empty element.- Strip newlines from remaining Message headers.
- Add support for JPEG XL, WebP, AVIF image extensions.
- Fix
Request::$trustProxyalways being set to true when
setTrustedProxies()is called. - Fix cookie handling for domain names in
Http\Client. - Fix cookie and header handling during redirects in
Http\Client. - Fix potential header injection in
Http\FormData. - Update composer-ca/bundle version for eMudhra certificate revocation.
- Reduced potential SQL injection in database expression objects.
- Preserve connection role in
SelectQuery::count()for complex queries. - Add range clamps to
Response::withFile()and negative offsets. - Fix
Response::isNotModified()with weak entity tags. ServerRequest::domain()andsubdomain()now omit the port.
Contributors to 5.4.4
Thank you to all the contributors that submitted a pull request:
- Abdul Malik Ikhsan
- ADmad
- Dylan Pulver
- geoffg-sentry
- Jamison Bryant
- Kevin Pfeifer
- Lay
- Mark Scherer
- Mark Story
- Masaki Kagaya
- Mikkel Bonde Wiuff
- othercorey
- Wleeaf
As always, we would like to also thank all the contributors that opened issues, or updated the documentation.
CakePHP 4.6.6
- Strip newlines from remaining Message headers.
- Fix cookie handling for domain names in Http\Client.
- Fix cookie and header handling during redirects in Http\Client.
- Fix potential header injection in Http\FormData.
- Update composer-ca/bundle version for eMudhra certificate revocation.
- Reduced potential SQL injection in database expression objects.
CakePHP 5.4.3
The CakePHP core team is happy to announce the immediate availability of CakePHP 5.4.3. This is a maintenance release for the 5.4 branch that fixes community reported issues, regressions.
Bugfixes
You can expect the following changes in 5.4.3. See the changelog for every commit.
- Improve API doc blocks for
SelectQuery. - Fix typos in
QueryCompilerdoc blocks. - Improve compatibility of
subqueryassociation loading with MariaDB. - Fix warnings in postgres driver when disabling constraints.
Mailer\Messagenow allowstransferEncodingto be set in a mailer profile.- Fix mismatched body encoding when using the
base64orquoted-printabletransfer encodings. SchemaDialect::columnDefinitionSql()now preserves theunsignedattribute when operating on unknown abstract column types.- Fixed a performance regression related to duplicate query expression visitor traversals.
- Added periodic docker image builds to streamline getting started with docker.
- Added safety warnings to query builders. Thank you to Feei for reporting these documentation gaps through our security mailing list.
Contributors to 5.4.3
Thank you to all the contributors that submitted a pull request:
- ADmad
- Jefferson Gonçalves
- Kevin Pfeifer
- Mark Scherer
- Mark Story
- Mauro Brandoni
- mdalikadar
- MD Ali Kadar
- Nicos Panayides
- onice
- Tobse
As always, we would like to also thank all the contributors that opened issues, or updated the documentation.
CakePHP 5.4.2
The CakePHP core team is happy to announce the immediate availability of CakePHP 5.4.1. This is a maintenance release for the 5.4 branch that fixes community reported issues, regressions.
Bugfixes
You can expect the following changes in 5.4.2. See the changelog for every commit.
Http\Client\Responsenow initializes itsreasonPhraseattribute. This fixesTypeErrorbeing raised on test doubles.- Fatal error backtraces generated by PHP8.5+ are now preserved.
- Fix the parsing logic in
i18n extractto handle class name constants eg.Router::class Cache::pool()now guards against re-entrant construction which can happen when a cache engine logs an error during construction, and the application's logging uses cache pools.- Improved query generation for relations using subquery strategy and filtering queries with order by clauses.
- Multipart email messages now protect against header injection via the
Content-Dispositionheader. Thank you to mrraul124 for reporting this issue via the security mailing list. - Unbuffered queries now generate counts correctly.
- PostGIS column reflection no longer hardcodes the schema to
public. - Fixed subquery loading strategy errors related to nested joins.
RedisEngineno longer silently drops thetlsconfiguration options when used with persistent connections.- Error handling no longer logs missing template errors when the templates do not have a dedicated handler method defined.
Contributors to 5.4.2
Thank you to all the contributors that submitted a pull request:
- ADmad
- Andrii Pukhalevych
- Ishan Vyas
- Jayden Ireland
- Mark Scherer
- Mark Story
- Nicos Panayides
- saeideng
As always, we would like to also thank all the contributors that opened issues, or updated the documentation.
CakePHP 5.4.1
The CakePHP core team is happy to announce the immediate availability of CakePHP 5.4.1. This is a maintenance release for the 5.4 branch that fixes community reported issues, regressions and a security issue with RateLimitMiddleware. Thank you to yousukezan for reporting the security issue via our mailing list.
Bugfixes
You can expect the following changes in 5.4.1. See the changelog for every commit.
- Fixed incorrect alias generation with postgres driver and subqueries.
- Fixed errors related to newly added properties when
Database\Schema\ColumnandIndexare deserialized. - Fixed
Undefined array key "prefix"error when usingCache::add()withCache\Engine\NullEngine. - Changed default
ipHeaderinRateLimitMiddlewarefromx-forwarded-fortoremote_addr. - Improved API docs for
FunctionsBuilder.
Contributors to 5.4.1
Thank you to all the contributors that submitted a pull request:
- Alejandro Ibarra
- Kevin Pfeifer
- Mark Scherer
- Mark Story
- othercorey
As always, we would like to also thank all the contributors that opened issues, or updated the documentation.
CakePHP 5.4.0
The CakePHP core team is happy to announce the release of CakePHP 5.4.0. With the release of 5.4.0, the 5.1 will no longer receive security fixes. 5.2 will continue to receive security fixes until the release of 5.5.
What's new in 5.4.0
Some highlights of the 5.4.0 release include:
- A backwards compatible container implementation has been added to CakePHP.
- New methods on
Collectionfor working with keys, values, conditional method chaining, and imploding to a string. - New
Lockpackage for working with distributed locks. - Commands now have
$this->ioand$this->argsas properties. ConsoleHelpHeaderProviderInterfacelets commands customize help output header messages.- The
#[RequestToDto]attribute enables automatic mapping of request data to Data Transfer Objects. - Added
JsonStreamResponsefor more memory efficient streaming of large JSON responses. - Added several new expression builders for null-safe comparisons, and aggregations.
- Added
Connection::afterCommit()to register callbacks that run after the outermost transaction commits. - Additional postgres index metadata reflection and generation support was added.
LoggedQuery::setRedactor()was added to scrub sensitive data from query logs.- Added a PSR-13 Link header implementation.
Number::toReadableSizes()now defaults binary units (KiB = 1024 bytes) withsetUseIecUnits().I18n::setCacheConfig()lets you rename the_cake_translations_cache profile.cake i18n extractnow extracts labels added with the#[Label]attribute.- The
associatedoption innewEntity()andpatchEntity()supports the nested array format used bycontain(). TestCase::mockModel()enables mocking of model classes with Mockery.- Added new
Utility\Fsclasses for scanning and pattern based discovery of directory trees. Security::encrypt()now supports longer keys with separate encryption and authentication keys.Text::mask()andText::maskValue()were added.FormHelper::enumOptions()was added to make generating form inputs from enums easier.- The default eager loading strategy for
HasManyandBelongsToManyassociations was changed fromselect to subquery. - Table methods for patching, saving, deleting and loading entities now check entity class types and reject mismatched entities.
FormHelpernow wraps hidden form blocks used for CSRF and tampering prevention withhiddenattributes instead of inline styles.Application::events()andPlugin::events()are now called consistently in both web and CLI contexts, and can use DI container services.
The migration guide has a complete list of what's new in 5.4.0. We recommend you give that page a read when upgrading as it notes the behavior changes present in 5.4.0.
Contributors to 5.4.0
Thank you to all the contributors that have contributed to this release:
- Abdul Malik Ikhsan
- ADmad
- celsowm
- gillux
- Graham Watson
- Jamison Bryant
- Jasper Smet
- Joachim Rey
- Kevin Pfeifer
- Mallik Hassan
- Mark Scherer
- Mark Story
- Nicos Panayides
- othercorey
As always, a huge thanks to all the community members that helped make this release happen by reporting issues and sending pull requests.
CakePHP 5.2.15 released
Contains another backported fix from 5.3.7
CakePHP 5.1.10 released
Contains another backported fix from 5.3.7
CakePHP 5.1.9 released
Fixes a syntax error that slipped into 5.1.8
CakePHP 4.6.5
The CakePHP core team is happy to announce the immediate availability of CakePHP 4.6.5. This is a maintenance release for the 4.6 branch that fixes community reported issues and two security issues. Advisories will be published for the issues over the next week as vulnerability reviews are completed. Thank you to @unknownhad and Rotem Reiss for reporting these issues via our security process. The security fixes have been backported and released as 4.5.12 as well.
Bugfixes
You can expect the following changes in 4.6.5. See the changelog for every commit.
- Normalized handling of
%2fin route paths to always be treated as an encoded value. - Improved parameter handling and escaping in
FunctionsBuilder. SmtpTransportnow strips CRLF from email header values.
Contributors to 4.6.5
Thank you to all the contributors that submitted a pull request:
- Mark Story
As always, we would like to also thank all the contributors that opened issues, or updated the documentation.