- Add friendsofphp/php-cs-fixer ^3.75 and phpstan/phpstan ^2.0 to
require-dev; add .php-cs-fixer.dist.php (@Symfony ruleset with
phpdoc_to_comment ignored_tags) and phpstan.neon (level max,
treatPhpDocTypesAsCertain: false)
- Run CS Fixer and PHPStan in every CI matrix job alongside tests
- Add composer scripts: cs, cs-check, phpstan
- Add .php-cs-fixer.cache to .gitignore
- Fix all PHPStan max violations across src/: add return/param types,
narrow mixed config values with is_string()/is_array() guards,
use TaggedNodeInterface for scenario tag access in SessionsListener
- Remove GoutteFactory and its spec — the goutte driver and its
underlying client library are abandoned
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
CI matrix now has a behat-version dimension (stable / 4.x-dev) so both
Behat 3.31 and Behat 4 are tested explicitly. Symfony 8.x rows always
use Behat 4; Symfony 7.4 rows test both versions.
behat.dist.php works with Behat 3.31 too (Behat\Config\Config exists as
a bridge since 3.31), so drop behat.yml.dist and always use the PHP
config — removes the if/else branch from CI and unifies local dev too.
SessionsListener: fix type hint on prepareDefaultMinkSession from
ScenarioLikeTested to ScenarioTested — the method uses getSuite() which
is on LifecycleEvent (not ScenarioLikeTested), and the dispatched events
are ScenarioTested subclasses. Also remove now-unused ScenarioLikeTested
import.
ServiceContainer/MinkExtension: add missing return types (: string,
: void) to all interface method overrides to satisfy Behat 4's stricter
interface signatures.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- lock-symfony-version.sh: replace cat<<<$(jq) with tmp+mv to avoid
file truncation; add .key as $k capture in with_entries per jq safety rules
- lock-behat-version.sh: new script mirroring lock-symfony-version.sh,
fixes the Behat 4 lock step which was wrongly targeting require-dev
instead of require
- CI: actions/checkout@v3 → @v4; composer validate --strict; use
lock-behat-version.sh in the Behat 4 step
- composer.json: widen symfony/config, symfony/browser-kit,
symfony/http-client to ^7.4 || ^8.0 so Symfony 8 installs without CI overrides
- MinkContext: add #[\Behat\Step\Given/When/Then] attributes alongside
existing docblocks so Behat 4 (which ignores docblock annotations)
can discover all step definitions
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The lock-symfony-version.sh script pins all symfony/* packages to the
matrix version, but symfony/deprecation-contracts uses its own versioning
(3.x) rather than following Symfony's major/minor scheme. Removing it as
a direct dependency is safe — it is always pulled in transitively via
symfony/config and others.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Drop PHP <8.3 and Symfony <7.4 (both EOL), require PHP ^8.3 and symfony/config ^7.4
- Require behat ^3.31 (first version with PHP 8 attribute and PHP config support)
- Upgrade phpspec to ^8.0 (supports PHP 8.5)
- Add symfony/browser-kit and symfony/http-client to dev deps; switch from deprecated goutte driver to browserkit_http
- Update CI matrix: PHP 8.3/8.4/8.5 × Symfony 7.4 + PHP 8.4/8.5 × Symfony 8.0/8.1
- Add Symfony 8+ CI step: override behat to 4.x-dev as 3.31.0
- Restrict push trigger to master branch only (no duplicate runs on PRs)
- Add behat.dist.php for behat 4.x compatibility (PHP config format)
- Update behat.yml.dist to use FQCN extension name (works in both behat 3.x and 4.x)
- Add lock-symfony-version.sh script for pinning Symfony in CI
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Mark Goutte, Selenium, Sahi and Zombie driver/support as abandoned
This marks the four drivers as abandoned where the driver implementations are no longer maintained.
* Correctly indent notes so they don't break the enumeration list
* Indent a few more notes that are part of a numerated list
This PR was merged into the 2.1.x-dev branch.
Discussion
----------
behatch/contexts relies on your fork (thanks for fixing PHP compability!), but in one project we still use Symfony 3.4 (LTS). This adds compatibility with that.
Would be great if a minor version could be released with this so I can remove my fork that now publish a version we use with a repository override in composer.json
```
"repositories": [
{
"type": "vcs",
"url": "https://github.com/johanwilfer/MinkExtension"
}
],
```
Commits
-------
4613f91427 Update composer.json
a0559e1455 Update composer.json
f4c2fcf345 Update composer.json
Some capabilities need to have a dash in their name to match the name
expected by Selenium2 (which uses a mix of camel cased and dashed names).
This fix makes the MinkExtension incompatible with Symfony 2.0 and 2.1 but
they already reached their end of maintenance anyway.
Closes#91