Mark Goutte, Selenium, Sahi and Zombie driver/support as abandoned (#39)

* 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 commit is contained in:
Matthias Pigulla
2026-01-14 18:30:58 +01:00
committed by GitHub
parent 53dc4cec01
commit f5bd8e3d1f
7 changed files with 49 additions and 9 deletions

View File

@@ -9,3 +9,18 @@ This document summarizes the changes relevant for users when upgrading to new ve
The classes `FailureShowListener`, `SessionsListener` and `MinkExtension` have been marked as `@final`. They will become `final` classes in the next major release and you will no longer be able to use them by inheritance (https://github.com/FriendsOfBehat/MinkExtension/pull/41). The classes `FailureShowListener`, `SessionsListener` and `MinkExtension` have been marked as `@final`. They will become `final` classes in the next major release and you will no longer be able to use them by inheritance (https://github.com/FriendsOfBehat/MinkExtension/pull/41).
Additionally, the two listener classes have been marked as `@internal`. Starting with the next major version, their API may change at any time without further notice. Additionally, the two listener classes have been marked as `@internal`. Starting with the next major version, their API may change at any time without further notice.
## Deprecated drivers
Support for the following drivers has been deprecated, since the underlying driver implementations have been abandoned:
- GoutteDriver
- SeleniumDriver
- SahiDriver
- ZombieDriver
The corresponding `Factory` classes will trigger a deprecation notice when they are used to build the driver, for example
by using `goutte` as the driver identifier in the `behat.yml` configuration file (https://github.com/FriendsOfBehat/MinkExtension/pull/39/).
Note, however, that Behat currently does not have a built-in mechanism to collect such deprecation notices and display
them in a user-friendly way.

View File

@@ -24,7 +24,8 @@
"php": "^7.4 || ^8", "php": "^7.4 || ^8",
"behat/behat": "^3.0.5", "behat/behat": "^3.0.5",
"behat/mink": "^1.5", "behat/mink": "^1.5",
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0" "symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/deprecation-contracts": "^1.0 || ^2.0 || ^3.0"
}, },
"require-dev": { "require-dev": {
"behat/mink-goutte-driver": "^1.1 || ^2.0", "behat/mink-goutte-driver": "^1.1 || ^2.0",

View File

@@ -85,10 +85,10 @@ After installing the extension, there are 4 usage options available:
} }
``` ```
> [!NOTE] > [!NOTE]
> Keep in mind, that you can not have multiple step definitions with the same regex. > Keep in mind, that you can not have multiple step definitions with the same regex.
> It will cause a `RedundantException`. So, you can inherit from `MinkContext` > It will cause a `RedundantException`. So, you can inherit from `MinkContext`
> only with one of your context/subcontext classes. > only with one of your context/subcontext classes.
3. Adding `Behat\MinkExtension\Context\MinkContext` as a context in your suite. 3. Adding `Behat\MinkExtension\Context\MinkContext` as a context in your suite.
Exactly like the previous option, but gives you the ability to keep your main context Exactly like the previous option, but gives you the ability to keep your main context
@@ -103,10 +103,10 @@ After installing the extension, there are 4 usage options available:
- Behat\MinkExtension\Context\MinkContext - Behat\MinkExtension\Context\MinkContext
``` ```
> [!NOTE] > [!NOTE]
> Keep in mind, that you can not have multiple step definitions with the same regex. > Keep in mind, that you can not have multiple step definitions with the same regex.
> It will cause a `RedundantException`. So, you can inherit from `MinkContext` > It will cause a `RedundantException`. So, you can inherit from `MinkContext`
> only with one of your context/subcontext classes. > only with one of your context/subcontext classes.
4. Implementing `Behat\MinkExtension\Context\MinkAwareContext` with your context. 4. Implementing `Behat\MinkExtension\Context\MinkAwareContext` with your context.
@@ -174,6 +174,10 @@ with support for 7 drivers out of the box:
* `GoutteDriver` - headless driver without JavaScript support. In order to use * `GoutteDriver` - headless driver without JavaScript support. In order to use
it, modify your `behat.yml` profile: it, modify your `behat.yml` profile:
> [!IMPORTANT]
> Support for this driver has been deprecated, since the driver package has been abandoned.
> It will be removed in the next major version of this extension.
```yaml ```yaml
default: default:
extensions: extensions:
@@ -256,6 +260,10 @@ with support for 7 drivers out of the box:
* `SeleniumDriver` - javascript driver. In order to use it, modify your `behat.yml` * `SeleniumDriver` - javascript driver. In order to use it, modify your `behat.yml`
profile: profile:
> [!IMPORTANT]
> Support for this driver has been deprecated, since the driver package has been abandoned.
> It will be removed in the next major version of this extension.
```yaml ```yaml
default: default:
extensions: extensions:
@@ -268,6 +276,10 @@ with support for 7 drivers out of the box:
* `SahiDriver` - javascript driver. In order to use it, modify your `behat.yml` * `SahiDriver` - javascript driver. In order to use it, modify your `behat.yml`
profile: profile:
> [!IMPORTANT]
> Support for this driver has been deprecated, since the driver package has been abandoned.
> It will be removed in the next major version of this extension.
```yaml ```yaml
default: default:
extensions: extensions:
@@ -280,6 +292,10 @@ with support for 7 drivers out of the box:
* `ZombieDriver` - zombie.js javascript headless driver. In order to use it, modify * `ZombieDriver` - zombie.js javascript headless driver. In order to use it, modify
your `behat.yml` profile: your `behat.yml` profile:
> [!IMPORTANT]
> Support for this driver has been deprecated, since the driver package has been abandoned.
> It will be removed in the next major version of this extension.
```yaml ```yaml
default: default:
extensions: extensions:

View File

@@ -62,6 +62,8 @@ class GoutteFactory implements DriverFactory
*/ */
public function buildDriver(array $config) public function buildDriver(array $config)
{ {
trigger_deprecation('friends-of-behat/mink-extension', '2.8.0', 'Configuration for the "goutte" driver is deprecated, since the client implementation has been abandoned. Support for it will be removed in the next major version of this extension.');
if (!class_exists('Behat\Mink\Driver\GoutteDriver')) { if (!class_exists('Behat\Mink\Driver\GoutteDriver')) {
throw new \RuntimeException( throw new \RuntimeException(
'Install MinkGoutteDriver in order to use goutte driver.' 'Install MinkGoutteDriver in order to use goutte driver.'

View File

@@ -52,6 +52,8 @@ class SahiFactory implements DriverFactory
*/ */
public function buildDriver(array $config) public function buildDriver(array $config)
{ {
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.');
if (!class_exists('Behat\Mink\Driver\SahiDriver')) { if (!class_exists('Behat\Mink\Driver\SahiDriver')) {
throw new \RuntimeException( throw new \RuntimeException(
'Install MinkSahiDriver in order to use sahi driver.' 'Install MinkSahiDriver in order to use sahi driver.'

View File

@@ -50,6 +50,8 @@ class SeleniumFactory implements DriverFactory
*/ */
public function buildDriver(array $config) public function buildDriver(array $config)
{ {
trigger_deprecation('friends-of-behat/mink-extension', '2.8.0', 'Configuration for the "selenium" driver is deprecated, since the client implementation has been abandoned. Support for it will be removed in the next major version of this extension.');
if (!class_exists('Behat\Mink\Driver\SeleniumDriver')) { if (!class_exists('Behat\Mink\Driver\SeleniumDriver')) {
throw new \RuntimeException( throw new \RuntimeException(
'Install MinkSeleniumDriver in order to activate selenium session.' 'Install MinkSeleniumDriver in order to activate selenium session.'

View File

@@ -53,6 +53,8 @@ class ZombieFactory implements DriverFactory
*/ */
public function buildDriver(array $config) public function buildDriver(array $config)
{ {
trigger_deprecation('friends-of-behat/mink-extension', '2.8.0', 'Configuration for the "zombie" driver is deprecated, since the client implementation has been abandoned. Support for it will be removed in the next major version of this extension.');
if (!class_exists('Behat\Mink\Driver\ZombieDriver')) { if (!class_exists('Behat\Mink\Driver\ZombieDriver')) {
throw new \RuntimeException( throw new \RuntimeException(
'Install MinkZombieDriver in order to use zombie driver.' 'Install MinkZombieDriver in order to use zombie driver.'