symfony1 icon indicating copy to clipboard operation
symfony1 copied to clipboard

PHP 8.0 & 8.1

Open Tybaze opened this issue 2 years ago β€’ 4 comments

PHP 8.0 & 8.1 compatibility

[No enhancement - please consider to use Symfony5+ for your new Project]

Target : Maintains maximum backward compatibility down to 5.3.

Backport some fixes from PR #265, but I do not use "internal method return type", because use of "mixed" return type is required. But "mixed" keyword is not available before PHP 7.4, use anotation instead. 5f2b710e1fdc74c3a6a1ae6253a9e7680961f9f0

A lot of currently LTS Unix Distro are still running PHP 7.2 / 7.3 currently - and the goal of this repo is to maintain a sf1 running in most setup.

Tests

Great thanks to @alquerci for #262, rebasing with the /test/bin/test dockers tool. Currently pass all test.

For the moment, to run a successful PHP 8.1 test you should remove E_DEPRECATED or use my last commit for Doctrine1 submodule (Until FriendsOfSymfony1/doctrine1#85 be merged ):

PHP version Dependency Status
php53 highest 🟒
php54 highest 🟒
php55 highest 🟒
php56 highest 🟒
php70 highest 🟒
php71 highest 🟒
php72 highest 🟒
php73 highest 🟒
php74 highest 🟒
php80 highest 🟒
php81 highest 🟒

Future

One day PHP 9 will break compatibility with php < 7.4 due to the lacks of "mixed" keywords implementations.

Please consider rewriting your project to another framework, like Symfony5+ if your app do not support at least PHP 7.4.

Tybaze avatar Jun 10 '22 20:06 Tybaze

Sorry to be late for the review !

Tybaze avatar Aug 02 '22 12:08 Tybaze

Who is able to merge this pr? As far as I can tell, all requested changes have been fixed.

thirsch avatar Oct 04 '22 15:10 thirsch

@Tybaze I would wait for https://github.com/FriendsOfSymfony1/doctrine1/pull/85 to be merged.

In the meantime: can you squash some of the latest commits? (the "apply fix from thePanz", for example, those can go into a single "Apply code-style fixes" together with the other cs-fixes... wdyt? yes, I know, not a good commit message anyway ) :)

thePanz avatar Oct 05 '22 07:10 thePanz

Rebased ! Merged coding style review Merged small simplications into one commit.

Removed credits in the comments ^^

Tybaze avatar Oct 05 '22 15:10 Tybaze

Ping, everything should have been fixed or at least be commented. How about merging and releasing this thing? Thanks for your effort, @Tybaze!

thirsch avatar Nov 15 '22 21:11 thirsch

Do I need to do anything else to finalize the merge ? @thePanz

Current branch is running very well in production on 8.1 on my projects 😎

You're welcome @thirsch :-)

Tybaze avatar Nov 24 '22 08:11 Tybaze

@Tybaze : https://github.com/FriendsOfSymfony1/doctrine1/pull/85 got merged, any changes related here?

thePanz avatar Nov 24 '22 22:11 thePanz

@Tybaze : FriendsOfSymfony1/doctrine1#85 got merged, any changes related here?

Nothing more ☺️

Maybe we can create a tag in order to help people to know if they have the PH8.1 compatible version ? (also in the Dorctrine repo)

Tybaze avatar Nov 25 '22 08:11 Tybaze

@Tybaze doctrine1 v1.4.0-RC1 has been tagged

Would you please have a look at the https://github.com/FriendsOfSymfony1/doctrine1/pull/89 PR, as it could help with the next releases :)

Same for https://github.com/FriendsOfSymfony1/symfony1/pull/268

thePanz avatar Nov 25 '22 14:11 thePanz

I applied some additional changes @Tybaze , and fixed the last failure for the ValidatorFile

GitHub actions are now happy for PHP v7.4, v8.0 and v8.1

thePanz avatar Nov 25 '22 16:11 thePanz

Thanks and kudos to @Tybaze for making this possible!

Thanks @thirsch @mentalstring too :+1:

thePanz avatar Nov 25 '22 16:11 thePanz