Skip to content

Add support for Behat 4 - #59

Merged
NoResponseMate merged 9 commits into
FriendsOfBehat:masterfrom
GSadee:support-behat-4
Jul 15, 2026
Merged

Add support for Behat 4#59
NoResponseMate merged 9 commits into
FriendsOfBehat:masterfrom
GSadee:support-behat-4

Conversation

@GSadee

@GSadee GSadee commented Jul 14, 2026

Copy link
Copy Markdown

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 in SessionsListener no longer matched. Tags are now normalized (stripped of @) before comparison, restoring @javascript / @mink:* / @insulated handling across Behat 3 and 4.

acoulton and others added 5 commits July 14, 2026 07:12
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
GSadee force-pushed the support-behat-4 branch from 31123e2 to 1d8a8f6 Compare July 14, 2026 05:14
@GSadee
GSadee marked this pull request as ready for review July 14, 2026 11:46
Comment thread UPGRADING.md Outdated
Comment thread composer.json Outdated
Comment thread composer.json
@NoResponseMate
NoResponseMate merged commit a5449b8 into FriendsOfBehat:master Jul 15, 2026
10 checks passed
@GSadee
GSadee deleted the support-behat-4 branch July 15, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants