Prepare for Symfomy 8.x compatibility#37
Open
mpdude wants to merge 2 commits intoFriendsOfBehat:masterfrom
Open
Prepare for Symfomy 8.x compatibility#37mpdude wants to merge 2 commits intoFriendsOfBehat:masterfrom
mpdude wants to merge 2 commits intoFriendsOfBehat:masterfrom
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? |
Author
|
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. |
aik099
approved these changes
Dec 3, 2025
|
That's good to know. Thank you. I've approved the PR. Hopefully somebody will merge it. |
4ca3441 to
d835c78
Compare
… unconditionally) using
mpdude
added a commit
to mpdude/MinkExtension
that referenced
this pull request
Dec 17, 2025
… 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
mpdude
added a commit
to mpdude/MinkExtension
that referenced
this pull request
Dec 17, 2025
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.