PHPackages                             dereuromark/cakephp-shim - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dereuromark/cakephp-shim

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

dereuromark/cakephp-shim
========================

A CakePHP plugin to shim applications between major framework versions.

3.8.3(3mo ago)401.0M↑10.2%119MITPHPPHP &gt;=8.2CI passing

Since Feb 2Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/dereuromark/cakephp-shim)[ Packagist](https://packagist.org/packages/dereuromark/cakephp-shim)[ Docs](https://github.com/dereuromark/cakephp-shim)[ RSS](/packages/dereuromark-cakephp-shim/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (87)Used By (9)

Shim plugin for CakePHP
=======================

[](#shim-plugin-for-cakephp)

[![CI](https://github.com/dereuromark/cakephp-shim/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/dereuromark/cakephp-shim/actions/workflows/ci.yml?query=branch%3Amaster)[![Coverage](https://camo.githubusercontent.com/6f831ee8f52e5f5a1763f9dc183bf4a1c99a550731702d8e915f149cf70c0782/68747470733a2f2f636f6465636f762e696f2f67682f6465726575726f6d61726b2f63616b657068702d7368696d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/dereuromark/cakephp-shim)[![PHPStan](https://camo.githubusercontent.com/f60d96f7c2579690ab6dfa8918f777fe93a02a92301c661eb38a85861a92b780/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e2e7376673f7374796c653d666c6174)](https://phpstan.org/)[![Latest Stable Version](https://camo.githubusercontent.com/02737793d88a0d2485076cd661844ace30fc98e6ea24bf60573215269675db7b/68747470733a2f2f706f7365722e707567782e6f72672f6465726575726f6d61726b2f63616b657068702d7368696d2f762f737461626c652e737667)](https://packagist.org/packages/dereuromark/cakephp-shim)[![Minimum PHP Version](https://camo.githubusercontent.com/ec21f169d70b69344c67d6f18fa1a24d20476d2f0cd680e8c4a1534c22f34e5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/8f22224b0bd794bb57b7301f9f76c24589d20aa9206be27c30554212e998625e/68747470733a2f2f706f7365722e707567782e6f72672f6465726575726f6d61726b2f63616b657068702d7368696d2f6c6963656e73652e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/3e3ffedd04ebc5c33f2329a2f61042b3b9ebf988c771282d12e145b25e8c0d5f/68747470733a2f2f706f7365722e707567782e6f72672f6465726575726f6d61726b2f63616b657068702d7368696d2f642f746f74616c2e737667)](https://packagist.org/packages/dereuromark/cakephp-shim)[![Coding Standards](https://camo.githubusercontent.com/dbabe22710e675cb88cd0b12196f1477e2376dea497332775692cf1359a75918/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f63732d5053522d2d322d2d522d79656c6c6f772e737667)](https://github.com/php-fig-rectified/fig-rectified-standards)

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 4.x in 5.x
--------------------------------------

[](#this-branch-is-for-shimming-4x-in-5x)

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.1+**. For details see [version map](https://github.com/dereuromark/cakephp-shim/wiki#cakephp-version-map).

"0-dependency plugin": Apart from core this plugin has no other dependencies!

Installation
------------

[](#installation)

Please see [Install.md](docs/Install.md)

Usage
-----

[](#usage)

Please see [Docs](docs/README.md).

A full overview of all shimming between versions can be found in the [Wiki](https://github.com/dereuromark/cakephp-shim/wiki).

New shims
---------

[](#new-shims)

- find('list') shim for 1-2 select fields without requiring verbose keyField/valueField options.
- RequestHandler component for continued easier View class switching across the app
- LegacyModelAwareTrait for loadModel() shimming
- former Cake\\Filesystem\\File and Cake\\Filesystem\\Folder classes
- ModifiedTrait for entities and detecting actually changed fields (not just touched with same value)

Note: AuthComponent lives on in 5.x via [TinyAuth plugin](https://github.com/dereuromark/cakephp-tinyauth) if needed.

Existing shims from 4.x
-----------------------

[](#existing-shims-from-4x)

- Controller setup for components and helpers
- Nullable behavior for better data consistency.
- `Table::field()` support and `fieldByConditions()` 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` or `modified` field exists in table.

Helpful links
-------------

[](#helpful-links)

When planning to upgrade, you should look into official [upgrade docs](https://book.cakephp.org/5/en/appendices/5-0-upgrade-guide.html) 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/](https://www.dereuromark.de/2023/09/28/cakephp-5-upgrade-guide/).

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance84

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 96.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~66 days

Total

83

Last Release

101d ago

Major Versions

0.7.2 → 2.0.0-beta2019-12-27

1.10.2 → 2.0.12020-04-19

0.7.4 → 2.1.02020-09-15

0.7.5 → 2.1.12021-04-28

0.7.6 → 3.0.0-RC2023-09-10

PHP version history (7 changes)0.1.0PHP &gt;=5.4

1.3.0PHP &gt;=5.5

1.6.0PHP &gt;=5.6

2.0.0-betaPHP &gt;=7.2

2.3.0PHP &gt;=7.3

3.0.0-RCPHP &gt;=8.1

3.8.3PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39854?v=4)[Mark Scherer](/maintainers/dereuromark)[@dereuromark](https://github.com/dereuromark)

---

Top Contributors

[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (423 commits)")[![challgren](https://avatars.githubusercontent.com/u/88909?v=4)](https://github.com/challgren "challgren (13 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (1 commits)")[![LordSimal](https://avatars.githubusercontent.com/u/9105243?v=4)](https://github.com/LordSimal "LordSimal (1 commits)")

---

Tags

cakephpcakephp-plugincompatibility-wrapperphpshimshimpluginhelperscakephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dereuromark-cakephp-shim/health.svg)

```
[![Health](https://phpackages.com/badges/dereuromark-cakephp-shim/health.svg)](https://phpackages.com/packages/dereuromark-cakephp-shim)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)[cakedc/tiny-mce

TinyMCE Plugin for CakePHP

10790.2k](/packages/cakedc-tiny-mce)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

1646.8k1](/packages/dereuromark-cakephp-calendar)[dereuromark/cakephp-flash

A CakePHP plugin around powerful flash message handling.

1228.6k2](/packages/dereuromark-cakephp-flash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
