16 Commits

Author SHA1 Message Date
Kamil Kokot
41bac3c5b7 Remove inline @var annotations; fix spec session name; fix @var placement
- Replace all local-variable @var annotations with proper type guards:
  - MinkExtension configure closure: build inner array directly
    ($sessions[$driverType] = [$driverType => ...]) to avoid mixed offset access
  - MinkExtension loadSessions: add is_array($session) guard inside foreach
    so PHPStan narrows $session from mixed to array before key() call
  - DriverFactory::buildDriver @param broadened from array<string, mixed>
    to array<mixed> — is_array() only narrows to array<mixed> (key type
    unknown), so array<string, mixed> was unreachable at the call site
  - MinkAwareInitializer: move @var from inside constructor parameter list
    to a proper @param on the method docblock
- SessionsListenerSpec: replace 'goutte' (deleted driver) with
  'browserkit_http' as the example default session name

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-12 18:04:18 +02:00
Kamil Kokot
47a9d45cd1 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>
2026-06-12 17:43:01 +02:00
Christian Sciberras
aa631e6b67 Use underscore for driver key 2024-04-12 23:13:30 +02:00
Christian Sciberras
18a3f770db Implement WebdriverClassicDriver factory 2024-04-06 14:14:22 +02:00
thePanz
760868b9e5 Add support for BrowserKit driver 2022-03-04 15:17:34 +01:00
Shashikant
05c791c556 Create AppiumFactorySpec.php 2015-02-11 19:56:39 +00:00
Christophe Coevoet
14d3596895 Renamed the extension class to follow the Behat shortcut convention 2014-05-08 13:45:26 +02:00
Christophe Coevoet
82fb06bb57 Renamed the SauceLabsFactory for consistent casing 2014-04-26 23:50:08 +02:00
Christophe Coevoet
3b00c091e9 Added a factory configuring the Selenium2Driver for BrowserStack
Closes #103
Replaces #133
2014-04-26 23:50:00 +02:00
Christophe Coevoet
888ab86a72 Added the possibility to define the default session per suite 2014-04-26 20:23:19 +02:00
Christophe Coevoet
faaa8cc7fe Updated the listeners to use the new event classes 2014-03-12 03:09:00 +01:00
Christophe Coevoet
794ea867ea Removed unused use statements 2014-01-11 01:04:54 +01:00
Christophe Coevoet
3ee16c4b87 Refactored the configuration of sessions
The configuration now makes sessions a first-class citizen instead of
being centered around drivers. This allows defining several session based
on the same driver type.
Instead of allowing other extensions to register their own sessions to add
new drivers, they can now register a DriverFactory in the MinkExtension
during the extension initialization to make a new driver type available.
2014-01-11 00:13:12 +01:00
Christophe Coevoet
8f5332371a Updated the code for latest changes done in Behat 2014-01-05 00:48:09 +01:00
Christophe Coevoet
2c521b68ad Fixed the support of the insulated tag at the feature level 2014-01-04 17:16:54 +01:00
Christophe Coevoet
3059bc525c Added specs for the classes 2014-01-04 17:14:35 +01:00