A CakePHP plugin to shim applications between major framework versions.
This package is not auto-updated.
Last update: 2020-07-01 14:00:47 UTC
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 2.x functionality in 3.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 againc.
This plugin requires CakePHP 3.0+.
Please see SETUP.md
Please see Docs.
A full overview of all shimming between 2.x and 3.x can be found in the Wiki.
- Nullable behavior for better data consistency.
- Primary level
- Primary level
fieldByConditions()alias to migrate to.
- Still supports model properties
$actsAsand all relations (
$hasMany, ...) as it would be very time-consuming to manually adjust all those.
- Contains Session component as compatibility wrapper for request session object (and maybe also for Session helper if that one gets deprecated in 3.x).
- Auto-adds Timestamp behavior if
modifiedfield exists in table.
When planning to upgrade, you should look into the upgrade plugin for 2.x and upgrade app for 3.x. They both extend the core ones and 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.