maint: Support Behat 4.0#56
Open
acoulton wants to merge 5 commits into
Open
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.
This was referenced Jun 22, 2026
stof
reviewed
Jun 23, 2026
| public function buildDriver(array $config): Definition | ||
| { | ||
| trigger_deprecation('friends-of-behat/mink-extension', '2.8.0', 'Configuration for the "sahi" driver is deprecated, since the client implementation has been abandoned. Support for it will be removed in the next major version of this extension.'); | ||
| DeprecationCollector::trigger('Configuration for the "sahi" driver is deprecated, since the client implementation has been abandoned. Support for it will be removed in the next major version of MinkExtension.'); |
Member
There was a problem hiding this comment.
The previous deprecation using symfony/deprecation-contracts would mention that this deprecation comes from friends-of-behat/mink-extension since version 2.8.0. Your change loses that info.
The `--with` argument is only available for composer update, not composer install. Since there is no lockfile, these commands behave the same.
acoulton
commented
Jun 23, 2026
|
|
||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-progress | ||
| run: composer update --prefer-dist --no-progress --with behat/behat:"${{ matrix.behat-version }}" |
Author
There was a problem hiding this comment.
I missed switching this from composer install to composer update originally, which broke CI. Fixed now.
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.
Now that Behat 4.0.0-alpha1 has been release, add official support for Behat 4.0.
Also updates deprecations to use the official deprecation mechanism for Behat extensions, and updates docs to show how to configure the extension using Behat's PHP config (which is required from 4.0 onwards).