Repository navigation
v2.10.24.5
This release includes PHPUnit 9+ migration, CA certificate bundle modernization, and numerous improvements for PHP 8.0-8.5 compatibility.
Highlights
PHPUnit 9+ Migration (PR #14)
Complete migration to PHPUnit 9+ architecture:
- All tests now pass with PHPUnit 9.6+ on PHP 8.0-8.5
- Fixed critical infinite recursion bug in
CakeTestLoader::reload() - Refactored
CakeTestLoaderto implementTestSuiteLoaderinterface with composition pattern - Updated
CakeBaseReporterfrom extendingPHPUnit_TextUI_ResultPrinterto implementingResultPrinterinterface - Updated all PHPUnit class references from
PHPUnit_Framework_*toPHPUnit\Framework\*namespace - Removed legacy
CakeTestRunnerclass (functionality moved toCakeTestSuiteCommand)
CA Bundle Modernization (PR #15)
Replaced static cacert.pem with composer/ca-bundle:
- Uses system CA certificate bundle when available (OpenSSL default cert dir/file)
- Falls back to Mozilla CA bundle maintained by composer/ca-bundle
- Automatically updated through Composer ecosystem
- Removed outdated
lib/Cake/Config/cacert.pemfile (3,921 lines, last updated 2023) - Supports both
cafile(single bundle file) andcapath(certificate directory) configurations
Dispatcher Simplification
Streamlined autoload handling in dispatcher files:
- Breaking Change: Non-Composer installation no longer supported
- Removed manual
CAKE_CORE_INCLUDE_PATHdetection from dispatcher files - Removed
include_pathmanipulation logic (Composer autoload handles this) - Removed legacy
app/Vendor/cakephp/cakephppath detection - Added clear error messages when Composer dependencies are missing
Legacy Code Removal
Removed compatibility code for PHP < 8.0:
- Removed PHP 5.3/5.4 version checks from
ErrorHandler,Debugger,CakeSocket - Removed PHP 5.4 fallback logic in
CakeNumber::_numberFormat() - Simplified SSL/TLS configuration in
CakeSocket(removed PHP 5.3.2/5.6.0 checks) - Removed obsolete Debugger workarounds for PHP < 5.3
Performance Improvements
- JSON Output Optimization:
JsonViewnow only appliesJSON_PRETTY_PRINTwhen debug mode is enabled - Autoloading Enhancement: Added class existence check to
App::load()to prevent unnecessary file loading
PHP 8.5 Support (PR #12)
- All tests pass on PHP 8.5
- Confirmed compatibility across all database types (MySQL, PostgreSQL, SQLite, SQL Server)
- Fixed int cast warnings for values outside int range
- Added return type hints to database
limit()methods
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+
Testing:
- All tests pass with PHPUnit 9.6+
Breaking Changes
Composer-Only Installation Required
Non-Composer installation is no longer supported.
Projects must use Composer for dependency management. Manual installation paths and include_path manipulation have been removed from dispatcher files.
Migration Required:
- Copy updated dispatcher files:
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.php
cp vendors/friendsofcake2/cakephp/lib/Cake/Console/Templates/skel/Console/cake app/Console/cake- Remove old dispatcher files:
rm -f app/Console/cake.bat app/Console/cake.php- Run Composer:
composer installImpact: Applications already using Composer (recommended setup) require only file updates. Applications using manual installation will need to migrate to Composer.
Installation
New Installation
composer require friendsofcake2/cakephp:^2.10Update Existing Installation
composer update friendsofcake2/cakephpAfter updating, copy the updated dispatcher files as described in the Breaking Changes section.
Full 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.