From 542c89ab7da96af7cdab621f43514b90e3fcb40a Mon Sep 17 00:00:00 2001 From: Sam Burns Date: Mon, 22 Feb 2016 13:58:59 +0000 Subject: [PATCH 1/3] Removing Guzzle 3. (Guzzle 6 does not have a container) --- composer.json | 1 - src/Adapter/GuzzleContainerAdapter.php | 44 ------------------- ...zzleServiceBuilderContainerAdapterTest.php | 28 ------------ 3 files changed, 73 deletions(-) delete mode 100644 src/Adapter/GuzzleContainerAdapter.php delete mode 100644 tests/Adapter/GuzzleServiceBuilderContainerAdapterTest.php diff --git a/composer.json b/composer.json index e1b1d93..2a007f8 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ "require-dev": { "php": ">=5.4.0", "aura/di": "1.*", - "guzzle/service": "3.*", "illuminate/container": ">=4.0.0 <6.0.0", "mnapoli/php-di": "3.*", "nette/nette": "2.*", diff --git a/src/Adapter/GuzzleContainerAdapter.php b/src/Adapter/GuzzleContainerAdapter.php deleted file mode 100644 index 5d7d786..0000000 --- a/src/Adapter/GuzzleContainerAdapter.php +++ /dev/null @@ -1,44 +0,0 @@ -container = $container; - } - - public function get($id) - { - try { - return $this->container->get($id); - } catch (GuzzleNotFoundException $prev) { - throw AcclimateNotFoundException::fromPrevious($id, $prev); - } catch (\Exception $prev) { - throw AcclimateContainerException::fromPrevious($id, $prev); - } - } - - public function has($id) - { - return isset($this->container[$id]); - } -} diff --git a/tests/Adapter/GuzzleServiceBuilderContainerAdapterTest.php b/tests/Adapter/GuzzleServiceBuilderContainerAdapterTest.php deleted file mode 100644 index 5451d9f..0000000 --- a/tests/Adapter/GuzzleServiceBuilderContainerAdapterTest.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'class' => __NAMESPACE__ . '\Fixture\GuzzleValidService', - 'params' => ['data' => range(1, 5)], - ], - 'error' => [ - 'class' => __NAMESPACE__ . '\Fixture\GuzzleBrokenService', - 'params' => [], - ] - ]); - - return new GuzzleContainerAdapter($container); - } -} From 690d18a98318a4f71116fb4bc8607e1c66e59fa5 Mon Sep 17 00:00:00 2001 From: Sam Burns Date: Mon, 22 Feb 2016 14:00:50 +0000 Subject: [PATCH 2/3] Updating docs --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7bb1222..a8edf24 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,6 @@ Command design pattern. You can also use the `FailoverOnMissContainer` decorator ## Supported Containers * [Aura.Di Container](https://github.com/auraphp/Aura.Di/blob/develop/src/Aura/Di/ContainerInterface.php) -* [Guzzle Service Builder](https://github.com/guzzle/service/blob/master/Builder/ServiceBuilderInterface.php) * [Laravel Container](https://github.com/laravel/framework/blob/master/src/Illuminate/Container/Container.php) * [Nette DI Container](https://github.com/nette/nette/blob/master/Nette/DI/Container.php) * [PHP-DI Container](https://github.com/mnapoli/PHP-DI/blob/master/src/DI/Container.php) From 02c1e8f8032d52562bf6988c5a85b9e0576ff27e Mon Sep 17 00:00:00 2001 From: Sam Burns Date: Mon, 22 Feb 2016 21:31:38 +0000 Subject: [PATCH 3/3] Removing Guzzle from map file --- src/Adapter/map.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Adapter/map.php b/src/Adapter/map.php index b6627bc..0d85e96 100644 --- a/src/Adapter/map.php +++ b/src/Adapter/map.php @@ -13,7 +13,6 @@ 'Zend\Di\LocatorInterface' => 'Acclimate\Container\Adapter\ZendDiContainerAdapter', 'Illuminate\Container\Container' => 'Acclimate\Container\Adapter\LaravelContainerAdapter', 'Aura\Di\ContainerInterface' => 'Acclimate\Container\Adapter\AuraContainerAdapter', - 'Guzzle\Service\Builder\ServiceBuilderInterface' => 'Acclimate\Container\Adapter\GuzzleContainerAdapter', 'DI\Container' => 'Acclimate\Container\Adapter\PHPDIContainerAdapter', 'Nette\DI\Container' => 'Acclimate\Container\Adapter\NetteContainerAdapter', 'ArrayAccess' => 'Acclimate\Container\Adapter\ArrayAccessContainerAdapter',