This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Fix PathMiddlewareDecorator so that path changes in decorated middleware are respected #165
Merged
weierophinney
merged 5 commits into
zendframework:master
from
acelaya:path-middleware-fix
Apr 4, 2018
Merged
Fix PathMiddlewareDecorator so that path changes in decorated middleware are respected #165
weierophinney
merged 5 commits into
zendframework:master
from
acelaya:path-middleware-fix
Apr 4, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o account modifications performed in the request's path
…ecorated middleware
2 tasks
weierophinney
added a commit
that referenced
this pull request
Apr 4, 2018
Fix PathMiddlewareDecorator so that path changes in decorated middleware are respected
weierophinney
added a commit
that referenced
this pull request
Apr 4, 2018
weierophinney
added a commit
that referenced
this pull request
Apr 4, 2018
Thanks, @acelaya! I will push a patch for the v2.2 series shortly as well, based on this. |
Perfect! |
weierophinney
added a commit
to weierophinney/zend-stratigility
that referenced
this pull request
Apr 4, 2018
Backports the test case from zendframework#165, and makes minor changes so it will execute correctly under the v2.2 series. Test fails as expected.
weierophinney
added a commit
to weierophinney/zend-stratigility
that referenced
this pull request
Apr 4, 2018
Updates the `PathRequestHandlerDecorator` to accept a string prefix instead of a `ServerRequestInterface` to its constructor, and then to use that to build the request path to pass to the handler. The `PathMiddlewareDecorator` now passes the prefix instead of the original request to the `PathRequestHandlerDecorator` constructor. New test passes, but one existing test fails at this point.
weierophinney
added a commit
to weierophinney/zend-stratigility
that referenced
this pull request
Apr 4, 2018
The test testMiddlewareCallingNextWithRequestPassesRequestToNextMiddleware was using path segregated routes, but they were not pertinent to the behavior being tested, and, in fact, broke once we fixed the behavior reported in zendframework#165. The equivalent version 3 tests do not use path segregated routes, so the path segregation was removed in order to test the expected behavior correctly.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request provides a fix for zendframework/zend-expressive#606.
It fixes it for stratigility 3.0, but the same bug is present in stratigility 2.2. However, porting the changes should be easy.