Intl extension requirement.

This commit is contained in:
Kamil Wylegała 2024-05-07 22:37:40 +02:00
parent c1242974be
commit 6f481f6a03
2 changed files with 6 additions and 7 deletions

View file

@ -4,12 +4,6 @@
Unfortunately branch 2.x in original repository was taken down. Unfortunately branch 2.x in original repository was taken down.
## Incoming breaking changes
The `strftime` function is widely used in the framework codebase. We plan to replace it with `IntlDateFormatter::format()`, this method comes from the `Intl` extension. CakePHP2 doesn't use it, so it would be a **breaking change**. We'd like to start rolling it out in early **May 2024**.
If you have any concerns, let's discuss it under: https://github.com/kamilwylegala/cakephp2-php8/issues/65
## Why I created this fork? 🤔 ## 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 the newest PHP versions I decided to create fork of the framework. 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 the newest PHP versions I decided to create fork of the framework.
@ -38,6 +32,10 @@ Here are steps I took to migrate my project through all versions to PHP 8.1, may
- ~~Due to lack of tests ☝️~~ - **you also need to rely** on tests in your application after integrating with this fork. - ~~Due to lack of tests ☝️~~ - **you also 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. - If after integration you spot any issues related to framework please let me know by creating an issue or pull request with fix.
### Breaking changes
- In order to get rid of `strftime()` deprecation notices, it's required to switch to `IntlDateFormatter` class. This class is available in `intl` extension, fork requires `intl` extension to be enabled in PHP configuration. If you don't have `intl` extension, installing fork will result in error. Discussed (here)[https://github.com/kamilwylegala/cakephp2-php8/pull/64] and (here)[https://github.com/kamilwylegala/cakephp2-php8/issues/65].
## Installation ## Installation
This repository **is not** available in packagist, therefore your project's `composer.json` must be changed to point to custom repository. This repository **is not** available in packagist, therefore your project's `composer.json` must be changed to point to custom repository.

View file

@ -22,7 +22,8 @@
}, },
"suggest": { "suggest": {
"ext-openssl": "You need to install ext-openssl or ext-mcrypt to use AES-256 encryption", "ext-openssl": "You need to install ext-openssl or ext-mcrypt to use AES-256 encryption",
"ext-mcrypt": "You need to install ext-openssl or ext-mcrypt to use AES-256 encryption" "ext-mcrypt": "You need to install ext-openssl or ext-mcrypt to use AES-256 encryption",
"ext-intl": "Required to use IntlDateFormatter instead of strftime"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",