CakePHP plugin to "shim" functionality up and down for major versions of the framework.
MIT License
Shim plugin to "shim" functionality up and down for CakePHP major versions. It also provides some small app-specific fixes.
It provides compatibility wrapper access to 4.x functionality in 5.x.
This is mainly useful when upgrading large applications to the next major framework version. Tons of code needs to be adjusted, using this Shim plugin quite a few lines less need to be touched. Especially the ORM layer, which would need heavy refactoring, requires a lot less changes to get things working again.
This branch is for use with CakePHP 5.0+. For details see version map.
Please see Install.md
Please see Docs.
A full overview of all shimming between versions can be found in the Wiki.
Note: AuthComponent lives on in 5.x via TinyAuth plugin if needed.
Table::field()
support and fieldByConditions()
alias to migrate to.$primaryKey
, $displayField
, $order
, $validate
, $actsAs
and all$belongsTo
, $hasMany
, ...) as it would be very time-consuming tocreated
or modified
field exists in table.When planning to upgrade, you should look into official upgrade docs as well as the linked upgrade tool. They both contain tons of more ideas on how to get code aligned with the current direction of the framework to reduce friction in the long run. Also see my blog post dereuromark.de/2023/09/28/cakephp-5-upgrade-guide/.