-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Drop PHP 7.4 support #6922
Drop PHP 7.4 support #6922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next: apply Rector to update syntax and property promotion 👍
Note: UnionTypesRector may need to be skipped to avoid BC break
@samsonasik I'm working on it. Can we use property promotion? Isn't it a breaking change? |
Yes, Rector apply only on private property or protected property on final class which doesn't override parent by default. |
Just verify, public property in constructor promotion is also fine 👍 , see https://github.com/rectorphp/rector-src/blob/2b35d2e75ea03ffe643c012485952ec6df3ea2ba/rules-tests/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector/Fixture/fixture.php.inc#L30 |
BC break handling already covered, except we have special conditon, we may need to skip |
It seems using property promotion is okay. |
PHP 7.4 still has almost ~30% usage according to stats: https://packagist.org/php-statistics Isn't it a bit early to cut off such a volume of users? Maybe it's better to announce such a change for v4.4. |
@michalsn I think yes, that can wait until 4.4. The related PRs to it are for testing functionality and possible BC break. |
I agree with this. Even an important part of shield users use 7.4. |
It is true that there are still many. |
We definitely need 4.3 to be 7.4 compatible. It has lots and lots of changes and improvements, and if we're going to have a portion of the population lagging behind 8.x I would rather they are on a more compatible version. Maybe we release 4.3 and 4.4 together - the latter dropping support for 7.4 and making any internal upgrades (via Rector and CS Fixer) that we can. |
- '8.0' | ||
- '8.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only need one 8.x check - we can probably drop this matrix altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
.github/workflows/test-rector.yml
Outdated
@@ -40,7 +40,7 @@ jobs: | |||
strategy: | |||
fail-fast: false | |||
matrix: | |||
php-versions: ['7.4', '8.0'] | |||
php-versions: ['8.0', '8.1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: Rector doesn't really care about its native version; running in 7.4 was just a safety.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
We would end up maintaining two versions. Any fixes would have to go to both versions - it sounds like a little nightmare to me. Ideally, we could announce something with the release of v4.3 - that the dropping of PHP 7.4 is coming in 4.4 or 4.5 - but I feel like the final call on this should be based on usage statistics. |
The current Git flow only allows releases from |
I am not sure what the point is of releasing 4.4 at the same time. |
We are dropping 7.4 support. We can revisit that conversation if we need to, but our decision was that we don't have enough community contributors and maintainer time to support multiple release branches. I was suggesting that we release 4.3 as >=7.4 so all the work we've already done is still available to people stuck on 7; then, immediately after we apply >=8.0. We don't have to release that, but from that point on support for 7 would be gone. |
Just my thoughts: |
Thanks for the feedback @tangix. We've been back and forth on this a lot, but one reason we decided to push for >=8.0 now was to alleviate the upgrade path to v5. It's also in keeping with our policy of only supporting secure versions of PHP; I'm fine with some lingering overlap of 7.4 but committing to it for another year is committing us to an extra layer of responsibility from a language without security patches. |
Yes, PHP 7.4 is no longer supported and all users hold the security risk already. In summary, it would be something like this:
|
Description
See #6921
Checklist: