feat: behat 4.x compatibility#232
Open
atomiix wants to merge 1 commit into
Open
Conversation
l-stauberg
reviewed
Jun 29, 2026
Comment on lines
27
to
30
| "symfony/browser-kit": "^7.4", | ||
| "symfony/framework-bundle": "^7.4", | ||
| "symfony/process": "^7.4", | ||
| "symfony/yaml": "^7.4", |
There was a problem hiding this comment.
Is not compatible with behat 4 and symfony 8, not sure if this is wanted but definitely a heads up.
Author
There was a problem hiding this comment.
@l-stauberg it’s kinda on purpose, there is already 5 PRs adding Symfony 8/Behat 4, I thought maybe we can merge them before and only add this one on top for full compatibility.
But I can definitely make the change as well if needed!
There was a problem hiding this comment.
Maybe we can just wait for #229
That should be fine then.
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.
Adds support for Behat 4.x, which drops two things this extension and its test suite relied on: YAML configuration and doc-block annotations (both replaced: config by PHP files, step/hook definitions by PHP 8 attributes).
Production change
InitializedSymfonyExtensionEnvironment::bindCallee()now handles Behat 4's newLateBoundContextMethodCallable, binding it to the resolved context instance viabindTo(). This is the one code change needed for the extension itself to work under Behat 4 (per the changelog's "use explicit type for late-bound Context callable methods").Test suite migration (Behat 4 dropped YAML config + annotations)
behat.yml.distwithbehat.dist.phpusing the newConfig/Profile/Suitebuilder objects.TestContextfrom@Given/@When/@Then/@BeforeScenarioannotations to#[Given]/#[When]/#[Then]/#[BeforeScenario]attributes.TestContext::thereIsConfiguration()now generates PHP config files (behat.php), eval-ing the inline PHP snippet into aConfigobject and persisting it viaserialize()/unserialize()rather than parsing/dumping YAML.This PR depends on FriendsOfBehat/MinkExtension#58