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. The framework classes are in the Cake\ namespace: applications and plugins can keep their global classes as they are, or use namespaced classes and the CakePHP 5 directory layout.

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 asset integration, Twig views, CAPTCHA, End-to-End tests with Symfony Panther 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

Security

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.

For your own applications, the security packages check and harden them. pieceofcake2/security-check runs the checks of the known vulnerabilities of the Composer packages (SCA), of the code (SAST) and of the running application (DAST) in one command, each with a PDF report, and pieceofcake2/security-headers adds the security headers to every response. See Security Checks.

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.