Search by

pieceofcake2 / cakephp

ttsuru

The CakePHP 2 framework

Package info

github.com/pieceofcake2/cakephp

pkg:composer/pieceofcake2/cakephp

Statistics

Installs: 20 839

Dependents: 36

Suggesters: 0

Stars: 13

Open Issues: 0

v2.12.11 2026-10-19 09:41 UTC

README

GitHub License Packagist Version PHP PHPStan CI Codecov

This is a community-maintained fork of CakePHP 2.x that provides compatibility with PHP 8.0 and newer versions. The original CakePHP 2.x branch reached End of Life in June 2021. The fork keeps CakePHP 2 working on current PHP versions and fixes bugs and security issues; it does not add new features.

Important

This fork is based on CakePHP 2.10.24. Earlier versions are not supported.

Warning

Do not use CakePHP 2.x for new projects! This fork is only for maintaining existing legacy applications. For new projects, please use CakePHP 5.x which has modern PHP support, better performance, and active development.

Website | CHANGELOG | UPGRADE

Documentation

For AI coding tools, install the Markdown docs of the CakePHP 2 book as a dev dependency: composer require --dev pieceofcake2/docs (files in vendor/pieceofcake2/docs/docs/en/).

Start with Getting Started (Markdown), which summarizes what is different from CakePHP 2.10.

Requirements

  • PHP 8.0 to 8.5
  • MySQL 5.6+, PostgreSQL 9.4+, SQLite 3 or Microsoft SQL Server 2022+ (PDO)
  • The intl extension; mbstring is strongly recommended

See Requirements (Markdown) in the book for the details.

Installation

This fork is installed with Composer only. It declares replace for cakephp/cakephp, so plugins that require cakephp/cakephp 2.x keep working.

# New application, from the application skeleton
composer create-project pieceofcake2/app my_app

# Existing application
composer remove --no-update cakephp/cakephp
composer require pieceofcake2/cakephp

An existing application also needs updated dispatcher files and composer.json settings. See Installation (Markdown) in the book.

Upgrading

See Migrating from CakePHP 2.10 (Markdown) in the book for the migration steps and breaking changes, and UPGRADE.md for the changes of each release.

To prepare for CakePHP 5, you can move to the CakePHP 5-style directory layout while you stay on CakePHP 2. See Migrating to the Modern Layout (Markdown) and the pieceofcake2/app skeleton.

Integration Testing

IntegrationTestTrait and EmailTrait are backported from CakePHP 5. See Integration Testing (Markdown) in the book.

Security

Do not report vulnerabilities in public issues; follow the security policy.

The vulnerabilities fixed in this fork, including the known vulnerabilities of the original CakePHP 2.10.24, and other security changes such as SSL/TLS certificate validation with composer/ca-bundle are listed in Security Fixes (Markdown). See Security (Markdown) in the book for the supported versions and how fixes are announced.

Contributing

See the contribution guidelines, including running the tests and reporting issues.

Origin

This package is a maintained fork of cakephp/cakephp (cakephp/cakephp on Packagist, last upstream version 2.10.24), originally by the CakePHP community (Cake Software Foundation, Inc.). It is maintained for CakePHP 2 on modern PHP by pieceofcake2. It includes the PHP 8 compatibility work of kamilwylegala/cakephp2-php8 up to commit 5b6a103. Changes from the original are listed in CHANGELOG.md.

License

This project maintains the original MIT License from CakePHP. See LICENSE for details.

Acknowledgments