-
Notifications
You must be signed in to change notification settings - Fork 53
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
Bump minimum supported PHP version to 7.4 on v2 releases #32
Bump minimum supported PHP version to 7.4 on v2 releases #32
Conversation
I think we need to think twice before merging this. It is possible to implement v1 and v2 at the same time. The only thing that changes is the added return type. It the implementation is adding a return type but is still targetting v1, this is not going to cause issues. Let's take the example of Symfony. By introducing a return type in their container, they are indeed introducing a breaking change in their own library. So Symfony can only upgrade to psr/container in a new major release (Symfony 6) But Symfony 6 could target "psr/container ^1|^2" rather than only targetting "psr/container ^1". This makes a lot of sense (a lot of third party libraries are targetting "psr/container ^1" only and you don't want to make Symfony 6 incompatible with those libraries) But if we merge this PR and tag a v2.0.1, any user using PHP 7.2 or PHP 7.3 could install Symfony 6 using "composer update". This would automatically install "psr/container 2.0.0" which has the issue described in #30. Maybe we could instead:
What do you think? |
Correct, it won't happen in 5.x.
Only if you assume that Symfony 6 maintains compatibility with PHP 7.2/7.3. If Symfony 6 requires PHP 7.4 at least, we're good. And I think it's very likely that Symfony 6 will do that PHP bump (My personal prediction, no official announcement). Then again, Symfony is not the only container implementation out there, so your plan sounds reasonable. |
Not only they could, it's suggested by our bylaw. But they (or anyone else) can target only Or maybe even better |
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.
As for this PR, I agree with @moufmouf: we need to first revert the issue as we did in 1.1.1, so future users under PHP 7.2/7.3 will not incur in the same bug; afterwards, we could reintroduce the interface after bumping to 7.4.
We definitely forgot about this.. IMHO we should re-add @weierophinney @mnapoli @moufmouf WDYT? |
Sure! |
Fixes php-fig#30 for the v2 series by bumping to a PHP version that does interface inheritance correctly.
4c05c98
to
6009776
Compare
@Jean85 I've re-instated the |
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.
Nope, 7.4 is fine! 👍
…faces See #32 (comment) (cherry picked from commit 6009776)
Fixes #30 for the v2 series by bumping to a PHP version that does interface inheritance correctly.