From 19d481a9df8df27319a19538e12cd8b1a2256789 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 12 Jun 2016 15:10:25 +0200 Subject: [PATCH] Revert "Deprecate PageObjectAware in favour of injecting page objects directly into contexts" This reverts commit 28ca8aca8cd6c836f5dab50dca3b822de85a9925. --- doc/guide/working_with_page_objects.rst | 6 ------ features/changing_page_object_namespaces.feature | 1 - features/injecting_the_page_object_factory.feature | 1 - ...ame_resolver_for_the_default_page_object_factory.feature | 1 - features/using_page_objects_with_a_factory.feature | 1 - .../Context/Initializer/PageObjectAwareInitializer.php | 5 ----- .../Behat/PageObjectExtension/Context/PageObjectAware.php | 5 ----- .../Behat/PageObjectExtension/Context/PageObjectContext.php | 5 ----- 8 files changed, 25 deletions(-) diff --git a/doc/guide/working_with_page_objects.rst b/doc/guide/working_with_page_objects.rst index 7c5d8e6..737e4fd 100644 --- a/doc/guide/working_with_page_objects.rst +++ b/doc/guide/working_with_page_objects.rst @@ -59,12 +59,6 @@ with a type hint: Using the page object factory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - .. note:: - - ``PageObjectContext`` described here is deprecated in favour of - injecting page objects directly into context's constructor (described in the previous section). - ``PageObjectContext`` will be removed in future versions of this extension. - Pages are created with a built in factory. One of the ways to use them in your context is to call the ``getPage`` method provided by the ``SensioLabs\Behat\PageObjectExtension\Context\PageObjectContext``: diff --git a/features/changing_page_object_namespaces.feature b/features/changing_page_object_namespaces.feature index 2b7a72f..27e5ca8 100644 --- a/features/changing_page_object_namespaces.feature +++ b/features/changing_page_object_namespaces.feature @@ -1,4 +1,3 @@ -@deprecated Feature: Changing page object namespaces In order to organise my code better As a Developer diff --git a/features/injecting_the_page_object_factory.feature b/features/injecting_the_page_object_factory.feature index 3fb7656..0c655c7 100644 --- a/features/injecting_the_page_object_factory.feature +++ b/features/injecting_the_page_object_factory.feature @@ -1,4 +1,3 @@ -@deprecated Feature: Injecting a page object factory In order to avoid extending third-party contexts As a Developer diff --git a/features/providing_a_custom_class_name_resolver_for_the_default_page_object_factory.feature b/features/providing_a_custom_class_name_resolver_for_the_default_page_object_factory.feature index 83777b1..c85dbfa 100644 --- a/features/providing_a_custom_class_name_resolver_for_the_default_page_object_factory.feature +++ b/features/providing_a_custom_class_name_resolver_for_the_default_page_object_factory.feature @@ -1,4 +1,3 @@ -@deprecated Feature: Providing a custom class name resolver for the default page object factory In order to customise the way page object class names are resolved As an Experienced Developer diff --git a/features/using_page_objects_with_a_factory.feature b/features/using_page_objects_with_a_factory.feature index 1c2ec21..67553f3 100644 --- a/features/using_page_objects_with_a_factory.feature +++ b/features/using_page_objects_with_a_factory.feature @@ -1,4 +1,3 @@ -@deprecated Feature: Using page objects with a factory In order to keep my context files maintainable As a Developer diff --git a/src/SensioLabs/Behat/PageObjectExtension/Context/Initializer/PageObjectAwareInitializer.php b/src/SensioLabs/Behat/PageObjectExtension/Context/Initializer/PageObjectAwareInitializer.php index 24a5632..abceee3 100644 --- a/src/SensioLabs/Behat/PageObjectExtension/Context/Initializer/PageObjectAwareInitializer.php +++ b/src/SensioLabs/Behat/PageObjectExtension/Context/Initializer/PageObjectAwareInitializer.php @@ -2,16 +2,11 @@ namespace SensioLabs\Behat\PageObjectExtension\Context\Initializer; -@trigger_error('The '.__NAMESPACE__.'\PageObjectAwareInitializer class is deprecated since version 2.0 and will be removed in 3.0. Use the argument injection instead.', E_USER_DEPRECATED); - use Behat\Behat\Context\Context; use Behat\Behat\Context\Initializer\ContextInitializer; use SensioLabs\Behat\PageObjectExtension\Context\PageObjectAware; use SensioLabs\Behat\PageObjectExtension\PageObject\Factory as PageObjectFactory; -/** - * @deprecated in 2.0, to be removed in 3.0. Use the argument resolver instead. See http://behat-page-object-extension.readthedocs.org/en/latest/guide/working_with_page_objects.html#instantiating-a-page-object - */ class PageObjectAwareInitializer implements ContextInitializer { /** diff --git a/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectAware.php b/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectAware.php index bd639ac..79351ab 100644 --- a/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectAware.php +++ b/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectAware.php @@ -2,13 +2,8 @@ namespace SensioLabs\Behat\PageObjectExtension\Context; -@trigger_error('The '.__NAMESPACE__.'\PageObjectAware interface is deprecated since version 2.0 and will be removed in 3.0. Use the argument injection instead.', E_USER_DEPRECATED); - use SensioLabs\Behat\PageObjectExtension\PageObject\Factory as PageObjectFactory; -/** - * @deprecated in 2.0, to be removed in 3.0. Use the argument resolver instead. See http://behat-page-object-extension.readthedocs.org/en/latest/guide/working_with_page_objects.html#instantiating-a-page-object - */ interface PageObjectAware { /** diff --git a/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectContext.php b/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectContext.php index f52b794..3206570 100644 --- a/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectContext.php +++ b/src/SensioLabs/Behat/PageObjectExtension/Context/PageObjectContext.php @@ -2,16 +2,11 @@ namespace SensioLabs\Behat\PageObjectExtension\Context; -@trigger_error('The '.__NAMESPACE__.'\PageObjectContext class is deprecated since version 2.0 and will be removed in 3.0. Use the argument injection instead.', E_USER_DEPRECATED); - use Behat\Behat\Context\Context; use SensioLabs\Behat\PageObjectExtension\PageObject\Factory as PageObjectFactory; use SensioLabs\Behat\PageObjectExtension\PageObject\Page; use SensioLabs\Behat\PageObjectExtension\PageObject\Element; -/** - * @deprecated in 2.0, to be removed in 3.0. Use the argument resolver instead. See http://behat-page-object-extension.readthedocs.org/en/latest/guide/working_with_page_objects.html#instantiating-a-page-object - */ class PageObjectContext implements Context, PageObjectAware { /**