From fb3f802920338ea4692ebc84834522a2c0f23b44 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Wed, 17 Dec 2025 10:17:14 +0100 Subject: [PATCH 1/3] Soft-finalize classes that might need to be changed in the future --- src/Behat/MinkExtension/Listener/FailureShowListener.php | 2 ++ src/Behat/MinkExtension/Listener/SessionsListener.php | 2 ++ src/Behat/MinkExtension/ServiceContainer/MinkExtension.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/Behat/MinkExtension/Listener/FailureShowListener.php b/src/Behat/MinkExtension/Listener/FailureShowListener.php index 3e8a0d3d..5ba2f4d6 100644 --- a/src/Behat/MinkExtension/Listener/FailureShowListener.php +++ b/src/Behat/MinkExtension/Listener/FailureShowListener.php @@ -22,6 +22,8 @@ * Listens to failed Behat steps and shows last response in a browser. * * @author Konstantin Kudryashov + * + * @final since 2.8.0 */ class FailureShowListener implements EventSubscriberInterface { diff --git a/src/Behat/MinkExtension/Listener/SessionsListener.php b/src/Behat/MinkExtension/Listener/SessionsListener.php index 7a18cc95..5bf5630e 100644 --- a/src/Behat/MinkExtension/Listener/SessionsListener.php +++ b/src/Behat/MinkExtension/Listener/SessionsListener.php @@ -25,6 +25,8 @@ * Listens Behat events and configures/stops Mink sessions. * * @author Konstantin Kudryashov + * + * @final since 2.8.0 */ class SessionsListener implements EventSubscriberInterface { diff --git a/src/Behat/MinkExtension/ServiceContainer/MinkExtension.php b/src/Behat/MinkExtension/ServiceContainer/MinkExtension.php index 7a75ce55..6bb1e70b 100644 --- a/src/Behat/MinkExtension/ServiceContainer/MinkExtension.php +++ b/src/Behat/MinkExtension/ServiceContainer/MinkExtension.php @@ -38,6 +38,8 @@ * * @author Konstantin Kudryashov * @author Christophe Coevoet + * + * @final since 2.8.0 */ class MinkExtension implements ExtensionInterface { From c19b6451cc30a64af051579b3b9b37bd03fb9b18 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Wed, 17 Dec 2025 11:29:57 +0100 Subject: [PATCH 2/3] Leave a note in the UPGRADING document --- UPGRADING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 UPGRADING.md diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 00000000..d957f6b4 --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,12 @@ +# Upgrade notes for FriendsOfBehat/MinkExtension + +This document summarizes the changes relevant for users when upgrading to new versions. + +# Upgrade to 2.8 + +## Soft `@final` declarations added + +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). From e0c7defd8065cd5b9fde32ca3fe3aa635e954393 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 18 Dec 2025 13:31:22 +0100 Subject: [PATCH 3/3] @internal-ize listener classes --- UPGRADING.md | 7 +++---- src/Behat/MinkExtension/Listener/FailureShowListener.php | 1 + src/Behat/MinkExtension/Listener/SessionsListener.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UPGRADING.md b/UPGRADING.md index d957f6b4..5ad28da1 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -4,9 +4,8 @@ This document summarizes the changes relevant for users when upgrading to new ve # Upgrade to 2.8 -## Soft `@final` declarations added +## Soft `@final` and `@internal` declarations added -The classes `FailureShowListener`, `SessionsListener` and `MinkExtension` have been marked as `@final`. +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). -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. diff --git a/src/Behat/MinkExtension/Listener/FailureShowListener.php b/src/Behat/MinkExtension/Listener/FailureShowListener.php index 5ba2f4d6..a3b3d0bb 100644 --- a/src/Behat/MinkExtension/Listener/FailureShowListener.php +++ b/src/Behat/MinkExtension/Listener/FailureShowListener.php @@ -24,6 +24,7 @@ * @author Konstantin Kudryashov * * @final since 2.8.0 + * @internal since 2.8.0 */ class FailureShowListener implements EventSubscriberInterface { diff --git a/src/Behat/MinkExtension/Listener/SessionsListener.php b/src/Behat/MinkExtension/Listener/SessionsListener.php index 5bf5630e..69216394 100644 --- a/src/Behat/MinkExtension/Listener/SessionsListener.php +++ b/src/Behat/MinkExtension/Listener/SessionsListener.php @@ -27,6 +27,7 @@ * @author Konstantin Kudryashov * * @final since 2.8.0 + * @internal since 2.8.0 */ class SessionsListener implements EventSubscriberInterface {