Repository navigation
v2.10.24.6
This is a bug fix release addressing dispatcher and autoloader issues discovered in v2.10.24.5.
Bug Fixes
Dispatcher: PHP_SELF Configuration
Fixed $_SERVER['PHP_SELF'] to be properly set for all SAPI modes.
Issue:
In v2.10.24.5, $_SERVER['PHP_SELF'] was only set when using PHP's built-in server (cli-server SAPI). This could cause incorrect routing and URL generation when running under Apache, nginx, or other web servers.
Fix:
Added $_SERVER['PHP_SELF'] assignment outside the cli-server conditional block to ensure correct behavior across all web server configurations.
Impact:
Applications running on Apache, nginx, or other web servers will now have correct PHP_SELF values for routing and URL generation.
Autoloader: Priority Order
Prepended App autoloader to ensure priority over Composer's autoloader.
Issue:
The App autoloader was registered without the prepend flag, which could cause Composer's autoloader to take precedence. This could interfere with CakePHP's class loading conventions (App::uses, etc.).
Fix:
Changed spl_autoload_register(['App', 'load']) to spl_autoload_register(['App', 'load'], true, true):
- Second parameter (
true): Throws exception if registration fails - Third parameter (
true): Prepends to autoloader queue
Impact:
Ensures CakePHP's class loading conventions work correctly, particularly for classes registered via App::uses().
Compatibility
PHP Versions:
- PHP 8.0, 8.1, 8.2, 8.3, 8.4, 8.5
Databases:
- MySQL 5.7, 8.0+
- PostgreSQL 9.4+
- SQLite 3
- Microsoft SQL Server 2022+
Installation
New Installation
composer require friendsofcake2/cakephp:^2.10Update Existing Installation
composer update friendsofcake2/cakephpMigration from v2.10.24.5
No migration required. This release contains only bug fixes with no breaking changes.
If you updated dispatcher files in v2.10.24.5, you should update them again to include these fixes:
cp vendors/friendsofcake2/cakephp/lib/Cake/Console/Templates/skel/webroot/index.php app/webroot/index.php
cp vendors/friendsofcake2/cakephp/lib/Cake/Console/Templates/skel/webroot/test.php app/webroot/test.phpFull Changelog
See CHANGELOG.md for complete details.
Resources
Note: This is a community-maintained fork for PHP 8.x compatibility. For new projects, please use CakePHP 5.x.