Add support for Behat 4 - #59
Merged
Merged
Conversation
And simplify the CI scripts for installing Behat. Now that there
is an official 4.0-alpha1 release, we can use composer's built-in
`--with {package}:{version}` to specify which Behat version to
install. This also has the advantage that composer enforces that
the requested version fits within the constraint specified by the
actual composer.json.
Added the `@alpha` tag to the behat version in composer.json
itself - this will enforce that CI only installs the Behat alpha
release but requires stable releases of all other packages.
This also guarantees the called method is present (with the expected signature). This avoids the risk that an unexpected / incompatible version of `symfony/deprecation-contracts` is installed - since 2d50420 this package does not have an explicit dependency on symfony/deprecation-contracts and only assumes that a suitable version will be installed as a transitive dependency.
Behat is dropping support for YAML, and PHP config is available in all the versions MinkExtension now supports.
The `--with` argument is only available for composer update, not composer install. Since there is no lockfile, these commands behave the same.
GSadee
marked this pull request as ready for review
July 14, 2026 11:46
NoResponseMate
approved these changes
Jul 15, 2026
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.
Based on #56, with an additional fix.
Fix:
Under Behat 4,
getTags()returns tags with a leading@(e.g.@javascript,@mink:second,@insulated), so session detection inSessionsListenerno longer matched. Tags are now normalized (stripped of@) before comparison, restoring@javascript/@mink:*/@insulatedhandling across Behat 3 and 4.