Add behat-version matrix dimension, fix Behat 4 type errors, unify config
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>
This commit is contained in:
@@ -68,7 +68,7 @@ class MinkExtension implements ExtensionInterface
|
||||
$this->registerDriverFactory(new WebdriverClassicFactory());
|
||||
}
|
||||
|
||||
public function registerDriverFactory(DriverFactory $driverFactory)
|
||||
public function registerDriverFactory(DriverFactory $driverFactory): void
|
||||
{
|
||||
$this->driverFactories[$driverFactory->getDriverName()] = $driverFactory;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class MinkExtension implements ExtensionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(ContainerBuilder $container, array $config)
|
||||
public function load(ContainerBuilder $container, array $config): void
|
||||
{
|
||||
if (isset($config['mink_loader'])) {
|
||||
$basePath = $container->getParameter('paths.base');
|
||||
@@ -108,7 +108,7 @@ class MinkExtension implements ExtensionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function configure(ArrayNodeDefinition $builder)
|
||||
public function configure(ArrayNodeDefinition $builder): void
|
||||
{
|
||||
// Rewrite keys to define a shortcut way without allowing conflicts with real keys
|
||||
$renamedKeys = array_diff(
|
||||
@@ -177,7 +177,7 @@ class MinkExtension implements ExtensionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfigKey()
|
||||
public function getConfigKey(): string
|
||||
{
|
||||
return 'mink';
|
||||
}
|
||||
@@ -185,14 +185,14 @@ class MinkExtension implements ExtensionInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function initialize(ExtensionManager $extensionManager)
|
||||
public function initialize(ExtensionManager $extensionManager): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
$this->processSelectors($container);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user