-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Contracts] add return types and bump to v3 #42088
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
Conversation
nicolas-grekas
commented
Jul 13, 2021
Q | A |
---|---|
Branch? | 6.0 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | #42058 |
License | MIT |
Doc PR | - |
bd68e60
to
2891252
Compare
470b02d
to
c200b51
Compare
PR ready! |
dddcc52
to
cb120f4
Compare
I agree, and I did the same for psr/cache, sticking to 3.0. |
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.
LGTM but don't the test failures indicate a problem?
PHP Fatal error: Declaration of Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller\LoginController::getSubscribedServices() must be compatible with Symfony\Contracts\Service\ServiceSubscriberInterface::getSubscribedServices(): array in /home/runner/work/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php on line 66
cb120f4
to
44b1a7a
Compare
Thank you Nicolas. |
This PR was merged into the 6.4 branch. Discussion ---------- [Contracts] Allow psr/container 1.1 again | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT The only difference between psr/container 1.1 and 2.0 is one additional return type on the `ContainerInterface::has()` method, see php-fig/container@1.1.2...2.0.2 This means that if a package is compatible with 2.0 already (== all implementations already have that return type), it remains compatible with 1.1. However, in #42088 we changed the composer.json of our service-contracts package and replaced `^1.1` with `^2.0`, dropping support for 1.1 although there was no need to do so. I'm migrating a larger application to Symfony 7 at the moment which also consumes various Laminas packages. Due to Laminas still being stuck on psr/container 1.1, I cannot upgrade to service-contracts 3 which in turn blocks my Symfony 7 upgrade. It would smoothen the upgrade path a lot for me, if we released a service-contracts 3.x that allows the installation of psr/container 1.1 again. Commits ------- 80d34d0 Allow psr/container 1.1 again