Skip to content

Piece of Cake 2CakePHP 2, maintained for modern PHP

pieceofcake2/cakephp is a community-maintained fork of CakePHP 2.x that runs on PHP 8.0–8.5. Latest version of pieceofcake2/cakephp on PackagistSupported PHP versionsCI statusTest coveragePHPStan level 5Total downloads on PackagistLicense

CakePHP

Modern PHP

Runs on PHP 8.0–8.5. Installed and managed with Composer, with code that follows the CakePHP 5 coding standard.

Security fixes

Vulnerabilities found in CakePHP 2.x keep being fixed after the upstream end of life.

Tested

PHPUnit 9.6 test suites run in CI on every supported PHP version, together with PHPStan static analysis.

Modern tooling through plugins

Vite and Webpack Encore asset integration, Twig views, CAPTCHA, browser E2E testing and more.

Getting started ​

New application ​

Create a new application from the application skeleton:

bash
composer create-project pieceofcake2/app my_app

See Installation for the next steps. CakePHP 2 is for maintaining existing applications; if you are starting a new project, consider CakePHP 5.

Existing application ​

Replace cakephp/cakephp with pieceofcake2/cakephp:

bash
composer remove --no-update cakephp/cakephp
composer require pieceofcake2/cakephp

Then follow Migrating from CakePHP 2.10 for the composer.json settings and the breaking changes.

Packages ​

Every package is installed with Composer. Each name links to its documentation.

Core repositories

Development tools

Plugins

Debugging

Infrastructure

Logging & Monitoring

Templating

View Helpers

Forms & Validation

Database

Authentication and Authorization

Files

SEO

I18n

Security ​

Please do not report vulnerabilities in public issues or pull requests. Use GitHub's private vulnerability reporting: open the Security tab of the affected repository and click Report a vulnerability. See the security policy for details, and Security Fixes for the vulnerabilities fixed so far.

Contributing ​

Bug reports (especially PHP 8.x compatibility issues) and pull requests are welcome. Read the contribution guide before you start.

CakePHP is a trademark of the Cake Software Foundation. Piece of Cake 2 is a community project and is not affiliated with or endorsed by the Cake Software Foundation.