Skip to content

Commit

Permalink
Intl extension requirement.
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilwylegala committed May 30, 2024
1 parent eed5974 commit 10b466c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

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? 🤔

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.
Expand Down Expand Up @@ -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.
- 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

This repository **is not** available in packagist, therefore your project's `composer.json` must be changed to point to custom repository.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"suggest": {
"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": {
"phpunit/phpunit": "^9.5",
Expand Down

0 comments on commit 10b466c

Please sign in to comment.