-
Notifications
You must be signed in to change notification settings - Fork 33
Prepare for Symfomy 8.x compatibility #37
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
base: master
Are you sure you want to change the base?
Conversation
|
This change is a BC break, because older Symfony versions could not be used anymore. Have you checked, that with these changes you can use older Symfony versions? |
|
Great to see you're responsive 😄 This is how PHP type variance works – return types can be added "bottom up", even if the interfaces do not (yet) require it. See https://onlinephp.io/c/dba0d for an example – this is valid code. You can add the return types right now, and it will not affect compatibility with Symfony versions. But, unless you add this, the code won't work with Symfony 8. |
|
That's good to know. Thank you. I've approved the PR. Hopefully somebody will merge it. |
4ca3441 to
d835c78
Compare
… unconditionally) using
… Symfony 8.x Squash-merge of FriendsOfBehat#37 commit f428dd9 Author: Matthias Pigulla <mp@webfactory.de> Date: Wed Dec 17 12:41:48 2025 +0100 Declare dependencies for Symfony components that we are actually (and unconditionally) using commit d835c78 Author: Matthias Pigulla <mp@webfactory.de> Date: Tue Dec 2 18:38:41 2025 +0100 Prepare for Behat 4.x / Symfomy 8.x compatibility
… Symfony 8.x Squash-merge of FriendsOfBehat#37 commit f428dd9 Author: Matthias Pigulla <mp@webfactory.de> Date: Wed Dec 17 12:41:48 2025 +0100 Declare dependencies for Symfony components that we are actually (and unconditionally) using commit d835c78 Author: Matthias Pigulla <mp@webfactory.de> Date: Tue Dec 2 18:38:41 2025 +0100 Prepare for Behat 4.x / Symfomy 8.x compatibility
Symfony 8 added return types to all interfaces and classes. This leaks through the Behat API in places where Behat used classes from Symfony, for example the Event Dispatcher implementation or the
\Behat\Testwork\ServiceContainer\Extensioninterface which extends\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface.The Behat maintainers work on creating a new Behat release supporting Symfony 8, but it will also affect extensions like this one (Behat/Behat#1687).
Technically, this may be a BC break for people that extend the classes provided here (they're not final), but on the other hand, these classes were never meant to be an extension point in the first place.