Repository navigation
v2.11.0
Directory Structure Modernization and Documentation Improvements
This release modernizes the CakePHP 2.x directory structure to follow current PHP package standards and improves documentation for easier migration.
Major Changes
Directory Structure Modernization (PR #21)
Modern Directory Layout:
lib/Cake/→src/Cake/(framework source code)lib/Cake/Test/Case/→tests/TestCase/(framework tests)lib/Cake/Test/Fixture/→tests/Fixture/(test fixtures)lib/Cake/Console/cake→bin/cake(console executable)lib/Cake/Config/→config/(framework configuration)lib/Cake/View/andlib/Cake/Templates/→templates/(framework templates)
Modern Test Directory Support:
- Applications and plugins can now use modern
tests/TestCase/andtests/Fixture/directory structure - Test suite automatically detects both traditional and modern directory structures
- Enables gradual migration to modern directory layout
Smart Console Executable:
bin/cakenow auto-detects project structure (supports bothapp/andsrc/layouts)- Works seamlessly when installed via Composer (
vendor/bin/cake) - No manual configuration needed
Documentation Improvements
New UPGRADE.md:
- Comprehensive migration guide with all breaking changes
- Post-Installation Steps for both legacy and modern directory structures
- Detailed migration instructions for each breaking change
Improved README.md:
- Simplified Migration Guide section
- Clear references to detailed documentation
Plugin Extraction
- Bake Plugin (PR #17): Extracted to
pieceofcake2/bake - Upgrade Plugin (PR #19): Extracted to
pieceofcake2/upgrade
Developer Experience
- Added PHPDoc generic type annotations for better IDE support
- Improved type inference for
ClassRegistry::init()andController::loadModel()
Migration Guide
See UPGRADE.md for detailed migration instructions.
Post-Installation Steps
For Legacy Directory Structure (app/ directory):
composer require --dev pieceofcake2/bake
cp plugins/Bake/Console/Templates/skel/webroot/index.php app/webroot/index.php
cp plugins/Bake/Console/Templates/skel/webroot/test.php app/webroot/test.php
cp plugins/Bake/Console/Templates/skel/Console/cake app/Console/cake
chmod +x app/Console/cakeFor Modern Directory Structure (src/ directory):
See pieceofcake2/app for the modern application skeleton.
Full Changelog
See CHANGELOG.md for complete details.