app | ||
lib/Cake | ||
plugins | ||
vendors | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.htaccess | ||
.stickler.yml | ||
.travis.yml | ||
build.properties | ||
build.xml | ||
composer.json | ||
CONTRIBUTING.md | ||
index.php | ||
README.md |
Fork of CakePHP 2 with support for PHP8
For original README content please check original repository: https://github.com/cakephp/cakephp/tree/2.x
Unfortunately branch 2.x in original repository was taken down.
Why I created this fork? 🤔
CakePHP 2 stopped getting updates in the end of 2019 (AFAIR). Unfortunately in my case it's too expensive to migrate to newer versions of CakePHP. I started migrating to Symfony framework but I still use ORM from CakePHP (and actually I like it). So in order to keep up with newest PHP versions I decided to create fork of the framework.
⚠️ Before using this fork ⚠️
- Tests of CakePHP framework aren't refactored yet to support PHP 8. Main issue is old version of PHPUnit that is tightly coupled to framework's tests. Issue for fixing this situation is here: https://github.com/kamilwylegala/cakephp2-php8/issues/7
- Due to lack of tests ☝️ - you need to rely on tests in your application after integrating with this fork.
- If after integration you spot any issues related to framework please let me know by creating an issue or pull request with fix.
Installation
This repository is not available in packagist, therefore your project's composer.json
must be changed to point to custom repository.
Example configuration:
{
"require": {
"cakephp/cakephp": "dev-master as 2.10.24",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kamilwylegala/cakephp2-php8"
}
]
}
It means that composer will look at master
branch of repository configured under repositories
to resolve update of cakephp/cakephp
package.
Changelog
2021-12-20
- Fixed deprecation notices in PHP 8.1 for production code implementations:
ArrayAccess
Countable
IteratorAggregate
- PHP 8.0 requirement in composer.json
- Warning: Tests are not updated, Cake's tests rely on old version of PHPUnit so running them may show a lot of deprecations notices. Added issue to cover it: #7
2021-02-24
- Fixed ErrorHandler accordingly to PHP8 migration guide. Otherwise, error handler is logging too much and doesn't respect configured
error_reporting
.