From 6a9d0c0be4a6ba6a70076921a5ae8708350053ea Mon Sep 17 00:00:00 2001 From: Andy Franklin Date: Thu, 8 Aug 2019 18:15:40 +0100 Subject: [PATCH 1/5] upgrading symfonyExtension --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c24dc54..867e9a1 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "webmozart/assert": "^1.0", "symfony/http-kernel": "^3.0|^4.0", "symfony/browser-kit": "^3.0|^4.0", - "friends-of-behat/symfony-extension": "^0.2.1|^1.0" + "friends-of-behat/symfony-extension": "^^2.0" }, "require-dev": { "phpunit/phpunit": "^6" From 556c38d5debd7bda10a360216feb03c7cedf5923 Mon Sep 17 00:00:00 2001 From: Andy Franklin Date: Thu, 8 Aug 2019 18:19:18 +0100 Subject: [PATCH 2/5] upgrading symfonyExtension --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 867e9a1..e16a064 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "webmozart/assert": "^1.0", "symfony/http-kernel": "^3.0|^4.0", "symfony/browser-kit": "^3.0|^4.0", - "friends-of-behat/symfony-extension": "^^2.0" + "friends-of-behat/symfony-extension": "^2.0" }, "require-dev": { "phpunit/phpunit": "^6" From 07d5520a5a28c5fe885047f6593daabb32320c5c Mon Sep 17 00:00:00 2001 From: Andy Franklin Date: Sun, 11 Aug 2019 11:52:29 +0100 Subject: [PATCH 3/5] Updating readme and composer json --- README.md | 31 +++++++------------------------ composer.json | 4 ---- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 1f9cf1c..68dba05 100644 --- a/README.md +++ b/README.md @@ -26,36 +26,19 @@ Requires the FriendsOfBehat [SymfonyExtension](https://github.com/FriendsOfBehat extensions: Persata\SymfonyApiExtension: ~ - FriendsOfBehat\SymfonyExtension: - kernel: - bootstrap: vendor/autoload.php + FriendsOfBehat\SymfonyExtension: + bootstrap: config/bootstrap.php + kernel: + class: App\Kernel + path: src/Kernel.php + environment: test + debug: true ``` ## Additional Custom Contexts This package provides a `ContextInitializer` that will set the shared `ApiClient` on any Behat Contexts that implement the `ApiClientAwareContext`. It is best to extend the `RawApiContext` as this already includes the getter & setter for the `ApiClient` instance. -## ContextServiceExtension Integration - -If using the FriendsOfBehat [ContextServiceExtension](https://github.com/FriendsOfBehat/ContextServiceExtension), declare the `ApiContext` service like so: - -```yaml -services: - # ... - Persata\SymfonyApiExtension\Context\ApiContext: - tags: - - { name: fob.context_service } -``` - -If you need additional context services with access to the same shared ApiClient instance, have them extend `RawApiContext` and then declare the service like so: - -```yaml -services: - # ... - TheClass\Of\Your\CustomContext: - tags: - - { name: fob.context_service } -``` ## FOSRest Form Validation diff --git a/composer.json b/composer.json index e16a064..fc5523e 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,6 @@ "require-dev": { "phpunit/phpunit": "^6" }, - "suggest": { - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/context-service-extension": "^1.0" - }, "autoload": { "psr-4": { "Persata\\SymfonyApiExtension\\": "src/" From e1fb5587c5694f70e27e49914af4400d68234f50 Mon Sep 17 00:00:00 2001 From: Andy Franklin Date: Sun, 11 Aug 2019 11:53:56 +0100 Subject: [PATCH 4/5] Readme formatting fix --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 68dba05..1b2912d 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,13 @@ Requires the FriendsOfBehat [SymfonyExtension](https://github.com/FriendsOfBehat extensions: Persata\SymfonyApiExtension: ~ - FriendsOfBehat\SymfonyExtension: - bootstrap: config/bootstrap.php - kernel: - class: App\Kernel - path: src/Kernel.php - environment: test - debug: true + FriendsOfBehat\SymfonyExtension: + bootstrap: config/bootstrap.php + kernel: + class: App\Kernel + path: src/Kernel.php + environment: test + debug: true ``` ## Additional Custom Contexts From be3679bea7b2931f0f92296448cd93c32cca0340 Mon Sep 17 00:00:00 2001 From: Andy-franklin <37847329+Andy-franklin@users.noreply.github.com> Date: Wed, 16 Oct 2019 10:30:27 +0100 Subject: [PATCH 5/5] fix: Accessing public const kernel_id instead of private --- src/ServiceContainer/SymfonyApiExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceContainer/SymfonyApiExtension.php b/src/ServiceContainer/SymfonyApiExtension.php index 2cd95eb..a9eee9e 100644 --- a/src/ServiceContainer/SymfonyApiExtension.php +++ b/src/ServiceContainer/SymfonyApiExtension.php @@ -89,7 +89,7 @@ public function configure(ArrayNodeDefinition $builder) public function load(ContainerBuilder $container, array $config) { $container->setDefinition(self::API_CLIENT_ID, new Definition(ApiClient::class, [ - new Reference(SymfonyExtension::DRIVER_KERNEL_ID), + new Reference(SymfonyExtension::KERNEL_ID), $config['base_url'] ]));