From a5b6608421834e464c8c1db001024a242cd41962 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 10 Jan 2018 15:30:47 -0600 Subject: [PATCH] Marks deprecated classes This patch marks as deprecated classes we plan to remove in version 3.0.0. --- src/Delegate/CallableDelegateDecorator.php | 4 ++++ src/Exception/InvalidMiddlewareException.php | 3 +++ src/Exception/InvalidRequestTypeException.php | 2 ++ src/Middleware/CallableInteropMiddlewareWrapper.php | 3 +++ src/Middleware/CallableMiddlewareWrapper.php | 2 ++ src/Middleware/CallableMiddlewareWrapperFactory.php | 3 +++ src/NoopFinalHandler.php | 3 +++ src/Route.php | 2 ++ 8 files changed, 22 insertions(+) diff --git a/src/Delegate/CallableDelegateDecorator.php b/src/Delegate/CallableDelegateDecorator.php index 090e1bb..c38e572 100644 --- a/src/Delegate/CallableDelegateDecorator.php +++ b/src/Delegate/CallableDelegateDecorator.php @@ -15,6 +15,10 @@ /** * Decorate callable delegates as http-interop delegates in order to process * incoming requests. + * + * @deprecated since 2.2.0; to be removed in 3.0.0. This class is an internal + * detail used to allow usage of Stratigility within double-pass middleware + * frameworks; starting in 3.0.0, Stratigility will support PSR-15 only. */ class CallableDelegateDecorator implements DelegateInterface { diff --git a/src/Exception/InvalidMiddlewareException.php b/src/Exception/InvalidMiddlewareException.php index 16c96fd..4ac191b 100644 --- a/src/Exception/InvalidMiddlewareException.php +++ b/src/Exception/InvalidMiddlewareException.php @@ -9,6 +9,9 @@ use InvalidArgumentException; +/** + * @deprecated since 2.2.0; to be removed in 3.0.0. + */ class InvalidMiddlewareException extends InvalidArgumentException { /** diff --git a/src/Exception/InvalidRequestTypeException.php b/src/Exception/InvalidRequestTypeException.php index d9fc41a..4737bb3 100644 --- a/src/Exception/InvalidRequestTypeException.php +++ b/src/Exception/InvalidRequestTypeException.php @@ -12,6 +12,8 @@ /** * Exception thrown when Dispatch::process() is called with a non-interop * handler provided, and the request is not a server request type. + * + * @deprecated since 2.2.0; to be removed in 3.0.0. No longer used internally. */ class InvalidRequestTypeException extends RuntimeException { diff --git a/src/Middleware/CallableInteropMiddlewareWrapper.php b/src/Middleware/CallableInteropMiddlewareWrapper.php index 92d5811..c0360a2 100644 --- a/src/Middleware/CallableInteropMiddlewareWrapper.php +++ b/src/Middleware/CallableInteropMiddlewareWrapper.php @@ -11,6 +11,9 @@ use Webimpress\HttpMiddlewareCompatibility\HandlerInterface as DelegateInterface; use Webimpress\HttpMiddlewareCompatibility\MiddlewareInterface as ServerMiddlewareInterface; +/** + * @deprecated since 2.2.0; to be removed in 3.0.0. Use CallableMiddlewareDecorator instead. + */ class CallableInteropMiddlewareWrapper implements ServerMiddlewareInterface { /** diff --git a/src/Middleware/CallableMiddlewareWrapper.php b/src/Middleware/CallableMiddlewareWrapper.php index 9efc8a2..1a2c5c2 100644 --- a/src/Middleware/CallableMiddlewareWrapper.php +++ b/src/Middleware/CallableMiddlewareWrapper.php @@ -18,6 +18,8 @@ /** * Decorate legacy callable middleware to make it dispatchable as server * middleware. + * + * @deprecated since 2.2.0; to be removed in 3.0.0. Use DoublePassMiddlewareDecorator instead. */ class CallableMiddlewareWrapper implements ServerMiddlewareInterface { diff --git a/src/Middleware/CallableMiddlewareWrapperFactory.php b/src/Middleware/CallableMiddlewareWrapperFactory.php index 5fac424..166c087 100644 --- a/src/Middleware/CallableMiddlewareWrapperFactory.php +++ b/src/Middleware/CallableMiddlewareWrapperFactory.php @@ -9,6 +9,9 @@ use Psr\Http\Message\ResponseInterface; +/** + * @deprecated since 2.2.0; to be removed in 3.0.0. + */ class CallableMiddlewareWrapperFactory { /** diff --git a/src/NoopFinalHandler.php b/src/NoopFinalHandler.php index 9d83e68..a705466 100644 --- a/src/NoopFinalHandler.php +++ b/src/NoopFinalHandler.php @@ -10,6 +10,9 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +/** + * @deprecated since 2.2.0; to be removed in 3.0.0. + */ class NoopFinalHandler { /** diff --git a/src/Route.php b/src/Route.php index 7106156..534f4d2 100644 --- a/src/Route.php +++ b/src/Route.php @@ -17,6 +17,8 @@ * Details the subpath on which the middleware is active, and the * handler for the middleware itself. * + * @internal + * @deprecated since 2.2.0, to be removed in 3.0.0. * @property-read callable $handler Handler for this route * @property-read string $path Path for this route */