Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Add webimpress/http-middleware-compatibility support #260

Closed
wants to merge 3 commits into from
Closed

Add webimpress/http-middleware-compatibility support #260

wants to merge 3 commits into from

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented Nov 17, 2017

Add webimpress/http-middleware-compatibility support to make zend-mvc fully compatible with zend-stratigility 2.1

@Xerkus Xerkus changed the base branch from master to develop November 17, 2017 08:14
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
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xerkus I've added tests in #262

Copy link
Member Author

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.

Copy link
Member

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 :)

@weierophinney
Copy link
Member

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.

@Xerkus Xerkus added the wontfix label Jan 29, 2018
@Xerkus
Copy link
Member Author

Xerkus commented Jan 29, 2018

Since PSR-15 is out I am going to close this as won't fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants