dereuromark / cakephp-shim
A CakePHP plugin to shim applications between major framework versions.
Installs: 549 668
Dependents: 6
Suggesters: 0
Security: 0
Stars: 37
Watchers: 3
Forks: 11
Open Issues: 3
Type:cakephp-plugin
Requires
- php: >=7.3
- cakephp/cakephp: ^4.2
Requires (Dev)
- dereuromark/cakephp-ide-helper: ^1.9.0
- fig-r/psr2r-sniffer: dev-master
- phpunit/phpunit: ^9.5
- dev-master
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 2.0.0-beta
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.0
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-cake2
- dev-cake5
- dev-table-aware
- dev-cake3
This package is auto-updated.
Last update: 2023-05-13 09:24:23 UTC
README
Shim plugin to "shim" functionality up and down for CakePHP major versions. It also provides some small app-specific fixes.
This branch is for shimming 3.x in 4.x
It provides compatibility wrapper access to 3.x functionality in 4.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 4.2+. For details see version map.
Installation
Please see Install.md
Usage
Please see Docs.
A full overview of all shimming between versions can be found in the Wiki.
New shims
- Controller setup for components and helpers
- FormHelper BC for datetime (details).
Existing shims from 3.x
- Nullable behavior for better data consistency.
Table::field()
support andfieldByConditions()
alias to migrate to.- Still supports model properties
$primaryKey
,$displayField
,$order
,$validate
,$actsAs
and all relations ($belongsTo
,$hasMany
, ...) as it would be very time-consuming to manually adjust all those. - Auto-adds Timestamp behavior if
created
ormodified
field exists in table.
Helpful links
When planning to upgrade, you should look into upgrade app for 3.x/4.x as well as the rector 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.