diff --git a/Slim/App.php b/Slim/App.php index 38256d81c..75c3b4fa3 100644 --- a/Slim/App.php +++ b/Slim/App.php @@ -11,7 +11,7 @@ use Closure; use Exception; use FastRoute\Dispatcher; -use Interop\Container\Exception\ContainerException; +use Psr\Container\ContainerExceptionInterface as ContainerException; use InvalidArgumentException; use Psr\Container\ContainerInterface; use Psr\Http\Message\RequestInterface; diff --git a/Slim/Container.php b/Slim/Container.php index dcc5da70f..4641f6871 100644 --- a/Slim/Container.php +++ b/Slim/Container.php @@ -8,8 +8,8 @@ namespace Slim; use ArrayAccess; -use Interop\Container\ContainerInterface; -use Interop\Container\Exception\ContainerException; +use Psr\Container\ContainerInterface; +use Psr\Container\ContainerExceptionInterface; use InvalidArgumentException; use Pimple\Container as PimpleContainer; use Slim\Exception\ContainerException as SlimContainerException; @@ -95,9 +95,10 @@ private function registerDefaultServices($userSettings) * @return mixed * * @throws InvalidArgumentException Thrown when an offset cannot be found in the Pimple container - * @throws SlimContainerException Thrown when an exception is not an instance of ContainerException + * @throws SlimContainerException Thrown when an exception is + * not an instance of ContainerExceptionInterface * @throws ContainerValueNotFoundException No entry was found for this identifier. - * @throws ContainerException Error while retrieving the entry. + * @throws ContainerExceptionInterface Error while retrieving the entry. */ public function get($id) { @@ -120,7 +121,7 @@ public function get($id) } /** - * Tests whether an exception needs to be recast for compliance with Container-Interop. This will be if the + * Tests whether an exception needs to be recast for compliance with psr/container. This will be if the * exception was thrown by Pimple. * * @param InvalidArgumentException $exception @@ -153,9 +154,10 @@ public function has($id) * @return mixed * * @throws InvalidArgumentException Thrown when an offset cannot be found in the Pimple container - * @throws SlimContainerException Thrown when an exception is not an instance of ContainerException + * @throws SlimContainerException Thrown when an exception is not + * an instance of ContainerExceptionInterface * @throws ContainerValueNotFoundException No entry was found for this identifier. - * @throws ContainerException Error while retrieving the entry. + * @throws ContainerExceptionInterface Error while retrieving the entry. */ public function __get($name) { diff --git a/Slim/DefaultServicesProvider.php b/Slim/DefaultServicesProvider.php index 9f2612578..48a8d6e08 100644 --- a/Slim/DefaultServicesProvider.php +++ b/Slim/DefaultServicesProvider.php @@ -27,7 +27,7 @@ class DefaultServicesProvider /** * Register Slim's default services. * - * @param Container $container A DI container implementing ArrayAccess and container-interop. + * @param Container $container A DI container implementing ArrayAccess and psr/container. */ public function register($container) { diff --git a/Slim/Exception/ContainerException.php b/Slim/Exception/ContainerException.php index 92ff01093..fb0184986 100644 --- a/Slim/Exception/ContainerException.php +++ b/Slim/Exception/ContainerException.php @@ -7,9 +7,9 @@ namespace Slim\Exception; -use Interop\Container\Exception\ContainerException as InteropContainerException; +use Psr\Container\ContainerExceptionInterface; use InvalidArgumentException; -class ContainerException extends InvalidArgumentException implements InteropContainerException +class ContainerException extends InvalidArgumentException implements ContainerExceptionInterface { } diff --git a/Slim/Exception/ContainerValueNotFoundException.php b/Slim/Exception/ContainerValueNotFoundException.php index 456464d38..0c715935b 100644 --- a/Slim/Exception/ContainerValueNotFoundException.php +++ b/Slim/Exception/ContainerValueNotFoundException.php @@ -7,9 +7,9 @@ namespace Slim\Exception; -use Interop\Container\Exception\NotFoundException as InteropNotFoundException; +use Psr\Container\NotFoundExceptionInterface; use RuntimeException; -class ContainerValueNotFoundException extends RuntimeException implements InteropNotFoundException +class ContainerValueNotFoundException extends RuntimeException implements NotFoundExceptionInterface { } diff --git a/composer.json b/composer.json index 126e338be..7be1584bf 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,6 @@ "pimple/pimple": "^3.0", "psr/http-message": "^1.0", "nikic/fast-route": "^1.0", - "container-interop/container-interop": "^1.2", "psr/container": "^1.0" }, "require-dev": { diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php index ef724121e..b989bb2ff 100644 --- a/tests/ContainerTest.php +++ b/tests/ContainerTest.php @@ -55,7 +55,7 @@ function (ContainerInterface $container) { } /** - * Test `get()` recasts InvalidArgumentException as ContainerInterop-compliant exceptions when an error is present + * Test `get()` recasts InvalidArgumentException as psr/container exceptions when an error is present * in the DI config * * @expectedException \Slim\Exception\ContainerException