Add PHP CS Fixer and PHPStan max to CI; remove abandoned GoutteFactory

- 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>
This commit is contained in:
Kamil Kokot
2026-06-12 17:43:01 +02:00
parent dff5cbd479
commit 47a9d45cd1
38 changed files with 436 additions and 720 deletions

View File

@@ -9,25 +9,25 @@ use PhpSpec\ObjectBehavior;
class MinkAwareInitializerSpec extends ObjectBehavior
{
function let(Mink $mink)
public function let(Mink $mink)
{
$this->beConstructedWith($mink, array('base_url' => 'foo'));
$this->beConstructedWith($mink, ['base_url' => 'foo']);
}
function it_is_a_context_initializer()
public function it_is_a_context_initializer()
{
$this->shouldHaveType('Behat\Behat\Context\Initializer\ContextInitializer');
}
function it_does_nothing_for_basic_contexts(Context $context)
public function it_does_nothing_for_basic_contexts(Context $context)
{
$this->initializeContext($context);
}
function it_injects_mink_and_parameters_in_mink_aware_contexts(MinkAwareContext $context, $mink)
public function it_injects_mink_and_parameters_in_mink_aware_contexts(MinkAwareContext $context, $mink)
{
$context->setMink($mink)->shouldBeCalled();
$context->setMinkParameters(array('base_url' => 'foo'))->shouldBeCalled();
$context->setMinkParameters(['base_url' => 'foo'])->shouldBeCalled();
$this->initializeContext($context);
}
}