Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x PHP 8 limitations #15210

Closed
garethellis36 opened this issue Dec 8, 2020 · 4 comments
Closed

2.x PHP 8 limitations #15210

garethellis36 opened this issue Dec 8, 2020 · 4 comments
Labels
Milestone

Comments

@garethellis36
Copy link
Contributor

Hello folks,

This commit states that 2.x will not support PHP 8 due to unsupported dependencies. Are the specific problems documented anywhere?

I support a large legacy application, and for us upgrading to 3.x/4.x is simply not practical. I would like to investigate the possibility of maintaining a fork of 2.x with PHP 8 support.

Thanks :)

@garas
Copy link
Member

garas commented Dec 8, 2020

CakePHP 2.x uses PHPUnit 5 which is incompatible with PHP 8. Without running test suite, it is not even known where issues exist.

Upgrading PHPUnit would take too much work, it might introduce new non backward compatible changes, which we don't want for CakePHP 2.x anymore.

@ADmad ADmad added this to the 2.10.24 milestone Dec 8, 2020
@ADmad ADmad added the support label Dec 8, 2020
@bancer
Copy link
Contributor

bancer commented Oct 5, 2021

@garethellis36 Probably, my 5 cents here are too late, but... In our 2.x (partially migrated to 3.x) project we moved TestSuite classes from the core to our project folders and upgraded them to PHPUnit 9.5.5. We use PHP 7.3 and just recently fixed our tests and they pass in PHP 8.0 now. So another approach could be to move TestSuite classes to a plugin and upgrade them separately from other CakePHP core classes.

@garethellis36
Copy link
Contributor Author

We actually ended up forking the framework; I upgraded PHPUnit (and removed the custom test runner), and then added PHP 8 support. There are a few things that fail hard on PHP 8, or which behave slightly differently.

We've been running in production on our fork for a while and are going to be upgrading to PHP 8 shortly.

@PetitCitron
Copy link

PetitCitron commented Oct 25, 2021

I don't use CakePhp 2.x i had to migrate all old apps.... it s was very unproductive task.... But great job, it's too difficult to folow cakephp versions updates. We will stay in cakephp4.2 now and fork it when support will stop. All new version functionality are not useful compare to code stability. Breaking change are unnecessary task... for developpers.

@cakephp cakephp locked as resolved and limited conversation to collaborators Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants