pieceofcake2 / app
CakePHP 2 application skeleton with a CakePHP 5-style directory layout
Requires
- php: >=8.0
- pieceofcake2/cakephp: ^2.12.7
- symfony/dotenv: ^5.4 || ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6
- pieceofcake2/bake: ^1.0
- pieceofcake2/debug_kit: ^2.2
- pieceofcake2/docs: ^2.0
- pieceofcake2/phpcs-cakephp2: ^1.1
- pieceofcake2/phpstan-cakephp2: ^1.0
Suggests
- dbrekelmans/bdi: Downloads a chromedriver that matches the installed Chrome for pieceofcake2/panther (vendor/bin/bdi detect drivers)
- pieceofcake2/panther: Browser End-to-End tests with Symfony Panther in tests/TestCase/EndToEnd/ (the EndToEnd suite of phpunit.xml.dist)
Provides
None
Conflicts
None
Replaces
None
README
The application skeleton for CakePHP 2 applications running on
pieceofcake2/cakephp, with a directory layout
compatible with CakePHP 5 (config/, src/, templates/, tests/, webroot/), .env
support, and the home page, layouts, error pages and styles of the CakePHP 5 skeleton.
Warning
CakePHP 2.x is for the maintenance of existing applications. For new projects, use the current major version of CakePHP instead.
Documentation
- Website: https://pieceofcake2.github.io/app/ (日本語: https://pieceofcake2.github.io/app/ja/)
- Markdown: docs/README.md (日本語: docs/ja/README.md) (for AI tools and offline reading)
It covers the installation, the directory layout, the configuration and .env files,
the pages and styles, running tests and PHPStan, and migrating an existing application to the modern layout.
For AI coding tools, the Markdown docs of the CakePHP 2 book are installed as a dev dependency (pieceofcake2/docs, files in vendor/pieceofcake2/docs/docs/en/).
Requirements
- PHP 8.0+
- Composer
- MySQL 5.6+, PostgreSQL 9.4+, SQLite 3 or SQL Server 2022+
Installation
composer create-project pieceofcake2/app my_app
Then copy config/database.php.default to config/database.php, set the database with
DATABASE_URL in config/.env.local (and the test database in config/.env.test.local) or
the environment, and
change the security salts in config/core.php (see
Generating the Security Salts).
The Bake and DebugKit plugins are development dependencies. config/bootstrap.php loads
them when they are installed, so bin/cake bake works out of the box and
composer install --no-dev still works in production.
Contributing
See the contribution guidelines.
Origin
This package is based on the app/ directory of
cakephp/cakephp (cakephp/cakephp on Packagist, last upstream
version 2.10.24), originally by the CakePHP community (Cake Software Foundation, Inc.). It was
extracted into a separate package and is maintained for CakePHP 2 on modern PHP by
pieceofcake2. Changes from the original are listed in the
commit history.
License
Licensed under the MIT License. See LICENSE.
webroot/css/normalize.min.css (normalize.css) and webroot/css/milligram.min.css
(Milligram) are MIT licensed, see their headers. The Raleway font in webroot/font/ is
licensed under the SIL Open Font License 1.1, see webroot/font/Raleway-License.txt.