CakePHP v5.4.0-RC1 Release Notes
Release Date: 2026-04-27 // about 2 months ago-
🚀 The CakePHP core team is happy to announce the first release candidate for CakePHP 5.4.0. The 5.4 release includes several behavior changes to increase correctness and new features. The highlights of those include:
What's new in 5.4.0
⬆️ 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.
- 0️⃣ The default eager loading strategy for
HasManyandBelongsToManyassociations has changed fromselecttosubquery. If you need the previous behavior, explicitly set'strategy' => 'select'when defining associations. Model.afterSaveCommitandModel.afterDeleteCommitevents are now fired whensave()ordelete()is called inside an outer transaction.Collectionhadkeys(),values(),implode(),when()andunless()methods added.- 0️⃣ Commands now have
$this->ioand$this->argsset by CakePHP. This will become the default in 6.0, andexecute()will no longer receive io & args parameters. - 👍 Database queries now support
notBetween(),inOrNull(),notInOrNull(),isDistinctFrom(),isNotDistinctFrom(),except(),exceptAll(), andstringAgg()operators/functions added. - 👌 Support for
brin,hash,gin, andspgistindexes for postgres was added. - ✅
TestCase::mockModel()has been added to enable mocking of table classes using Mockery. - 🆕 New filesystem utilities were added for fluent file discovery with pattern matching, and cross-platform path manipulation was added.
- 🔒
Security::encrypt()can now be configured to use longer keys with separate encryption and authentication keys that are derived from the provided key. - ➕ Added
Text::mask()method which masks a portion of a string with a repeated character.
How you Can Help
You can help deliver 5.4.0 by contributing in one of many ways:
📚 1. Check the documentation for mistakes, outdated, unclear or broken examples. We've been trying to update the documentation as we go, but there are likely examples or sections we've missed. ⬆️ 2. Try it out! Give CakePHP 5.4.0 a test drive. Let us know how upgrading went and if there were any rough spots.
- File issues for regressions in existing features, or suggest new features. Even if those features don't make it into 5.4.0, we're early in the process of planning 5.5 and 6.0 and value community feedback.
Contributors to 5.4.0-RC1
🚀 Thank you to all the contributors that have contributed to this release:
- ADmad
- Application-drop-up
- celsowm
- Jamison Bryant
- Jasper Smet
- Joachim Rey
- Kevin Pfeifer
- Mallik Hassan
- Mark Scherer
- Mark Story
- Masatoshi Ogiwara
- othercorey
🚀 As always, a huge thanks to all the community members that helped make this release happen by reporting issues and sending pull requests.
- 0️⃣ The default eager loading strategy for
Previous changes from v5.3.4
-
🚀 The CakePHP core team is happy to announce the immediate availability of CakePHP 5.3.4. This is a maintenance release for the 5.3 branch that fixes several community reported issues.
🛠 Bugfixes
👀 You can expect the following changes in 5.3.4. See the changelog for every commit.
- ➕ Added database connection context to errors logged for
QueryException. - 👌 Improved phpstan type inference, and table entity generics.
- 🛠 Fixed pagination sort condition merging with alias prefixed fields. Fields are now normalized before resolving sort direction.
Contributors to 5.3.4
Thank you to all the contributors that submitted a pull request:
- ADmad
- Application-drop-up
- Kevin Pfeifer
- Mark Scherer
- Mark Story
- Masatoshi Ogiwara
📚 As always, we would like to also thank all the contributors that opened issues, or updated the documentation.
- ➕ Added database connection context to errors logged for