Repository navigation
v2.12.0
Composer Autoloading Migration
Migrates CakePHP framework from include-path to Composer classmap autoloading, removing 798+ App::uses() declarations from framework classes while maintaining backward compatibility.
What Changed
- Removed all
App::uses()declarations from CakePHP framework classes (798 occurrences) - Framework classes are now automatically loaded via Composer's classmap autoloader
- Application classes can be automatically loaded by configuring Composer classmap autoloading in
composer.json - Maintained
App::uses()only for framework classes that extend application classes (AppController, AppModel, AppShell, AppHelper) to ensure backward compatibility
Benefits
- Simplifies class loading mechanism
- Improves compatibility with modern PHP tooling
- Reduces framework code complexity
- Enables gradual migration path for applications
Backward Compatibility
- Legacy applications using
app/directory structure continue to work without changes - Framework's remaining
App::uses()calls for application base classes ensure compatibility - Plugins continue to use
App::uses()as before
Migration Path
- Modern projects (
src/): Add classmap autoloading tocomposer.json(see pieceofcake2/app) - Legacy projects (
app/): No action required - works automatically - See UPGRADE.md for detailed migration instructions
Files Changed
- 338 files modified
- 1,515 deletions (removed
App::uses()declarations) - 476 insertions (documentation, error handling improvements)
Full Changelog
See CHANGELOG.md for complete list of changes.