Repository navigation
v2.10.24.4
Overview
This release brings significant code quality improvements through the adoption of modern PHP development tools and syntax modernization for PHP 8.x compatibility.
Highlights
Code Quality Improvements
- PHP CodeSniffer Update: Upgraded from 1.0.0 to 5.x standards for modern code formatting
- Comprehensive Code Formatting: Applied automatic formatting fixes across 683 files
- Enhanced Documentation: Added missing PHPDoc comments and fixed code style issues
PHP 8 Modernization
- Modern Syntax: Converted entire codebase to use PHP 8 syntax features
- Native Functions: Implemented PHP 8's
str_contains(),str_starts_with(), andstr_ends_with() - Improved Readability: Replaced legacy syntax with modern equivalents (
[]arrays,::class, etc.)
Development Tools
- PHPStan: Added for static analysis with CakePHP 2.x specific extension
- Rector: Integrated for automated PHP syntax modernization
- CI Integration: Added phpcs checks to GitHub Actions workflow
Full Changelog
Code Quality (PR #8)
- Updated
cakephp/cakephp-codesnifferfrom 1.0.0 to 5.x - Created comprehensive
phpcs.xmlconfiguration for CakePHP 2.x compatibility - Applied automatic code formatting fixes across 683 files using phpcbf
- Added exclusion rules for CakePHP 2.x specific patterns
- Fixed switch statement fall-through issues with explicit comments
- Standardized array alignment using Generic.Formatting.MultipleStatementAlignment
- Added proper documentation to SessionHandlerAdapter class
- Configured appropriate exclusions for test files and deprecated functions
Code Modernization (PR #7)
- Converted all
array()syntax to short array syntax[] - Implemented PHP 8 native string functions
- Replaced
get_class()with::classconstant - Updated array destructuring from
list()to[] - Applied null coalescing operators where appropriate
- Replaced
dirname(__FILE__)with__DIR__magic constant - Modernized 600+ files across lib/Cake, app, Test, TestSuite, and Templates directories
Development Dependencies
"require-dev": {
"cakephp/cakephp-codesniffer": "^5.0",
"friendsofcake2/phpstan-cakephp2": "^0.2.1",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^9.6",
"rector/rector": "^2.0"
}Statistics
- Files Changed: 683
- Pull Requests: 2 (PR #7, PR #8)
- Code Coverage: Maintained at existing levels
- PHP Versions Supported: 8.0, 8.1, 8.2, 8.3, 8.4
Notes for Developers
Breaking Changes
- This is primarily a development-time change and should not affect runtime behavior
- If you have custom coding standards, you may need to update your phpcs.xml configuration
- Code formatting has been standardized across the codebase
Migration
No action required for most users. If you have custom phpcs rules, review the new phpcs.xml configuration for compatibility.
Installation
composer require friendsofcake2/cakephp:^2.10.24.4
Or update your composer.json:
{
"require": {
"friendsofcake2/cakephp": "^2.10.24.4"
}
}
Full Changelog: v2.10.24.3...v2.10.24.4