-
Notifications
You must be signed in to change notification settings - Fork 90
Add webimpress/http-middleware-compatibility support #260
Conversation
zend-stratigility 2.1 added webimpress/http-middleware-compatibility to support all versions of http-interop/http-middleware.
@@ -142,7 +143,10 @@ private function createPipeFromSpec( | |||
if (is_string($middlewareToBePiped) && $serviceLocator->has($middlewareToBePiped)) { | |||
$middlewareToBePiped = $serviceLocator->get($middlewareToBePiped); | |||
} | |||
if (! $middlewareToBePiped instanceof MiddlewareInterface && ! is_callable($middlewareToBePiped)) { | |||
if (! $middlewareToBePiped instanceof MiddlewareInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this line anymore, please check line 11 in this file:
use Interop\Http\ServerMiddleware\MiddlewareInterface;
it should be removed.
You are using MiddlewareInstance from webimpress/http-middleware-compatibility
so it's enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed for stratigility 2.0.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Xerkus ok, fine, but we are not testing it then... Maybe we should set requirements to ^2.0.1 as it was and write additional test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really supporting it any more but allowing it to be used anyway as it is an optional dependency. If it was direct dependency, I would have bumped it to ^2.1.x and dropped that check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we keep this condition here, it should be also tested, this is why I've added it in PR #262 :)
I've written up a proposal for how we should go about updating to PSR-15 on the forums: Please read and comment there before moving forwards with the current pull request. |
Since PSR-15 is out I am going to close this as won't fix. |
Add webimpress/http-middleware-compatibility support to make zend-mvc fully compatible with zend-stratigility 2.1