From 79f341c6658086bf3b01514c860f14b1bf961792 Mon Sep 17 00:00:00 2001 From: Ashley Hutson Date: Wed, 5 Feb 2020 23:08:48 -0800 Subject: [PATCH 1/2] Make Youshido Container also implement Psr Container so no conflicts occur in other systems --- composer.json | 3 ++- src/Execution/Container/Container.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 83fdde7d..dc56a753 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "require": { "php": ">=5.5", "ext-mbstring": "*", - "symfony/property-access": "^2.8 || ^3.4 || ^4.4" + "symfony/property-access": "^2.8 || ^3.4 || ^4.4", + "psr/container": "^1.0" }, "require-dev": { "phpunit/phpunit": "^4.8" diff --git a/src/Execution/Container/Container.php b/src/Execution/Container/Container.php index 975f9d1b..2717fec9 100644 --- a/src/Execution/Container/Container.php +++ b/src/Execution/Container/Container.php @@ -8,7 +8,7 @@ namespace Youshido\GraphQL\Execution\Container; -class Container implements ContainerInterface +class Container implements ContainerInterface, \Psr\Container\ContainerInterface { private $keyset = []; @@ -72,4 +72,4 @@ private function assertIdentifierSet($id) throw new \RuntimeException(sprintf('Container item "%s" was not set', $id)); } } -} \ No newline at end of file +} From e6621b90c1302de3038c60ae635e48d370f3cf93 Mon Sep 17 00:00:00 2001 From: Ashley Hutson Date: Wed, 5 Feb 2020 23:12:53 -0800 Subject: [PATCH 2/2] Make naming of interface a use --- src/Execution/Container/Container.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Execution/Container/Container.php b/src/Execution/Container/Container.php index 2717fec9..42f4561c 100644 --- a/src/Execution/Container/Container.php +++ b/src/Execution/Container/Container.php @@ -8,7 +8,9 @@ namespace Youshido\GraphQL\Execution\Container; -class Container implements ContainerInterface, \Psr\Container\ContainerInterface +use \Psr\Container\ContainerInterface as PsrContainerInterface; + +class Container implements ContainerInterface, PsrContainerInterface { private $keyset = [];