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

Ensure Next processes the next delegate correctly when an error is present #85

Conversation

weierophinney
Copy link
Member

Discovered when updating tests for Expressive to work with Stratigility 1.3. Essentially, when nesting pipelines, if an inner middleware pipeline is exhausted and a non-null $err is present, if the next delegate was a Next instance, it was improperly being called as an http-interop DelegateInterface, losing the error argument. As such, if any parent delegate contained error middleware, that middleware would never be invoked.

This may be related to #84.

…esent

Discovered when updating tests for Expressive to work with Stratigility
1.3. Essentially, when nesting pipelines, if an inner middleware
pipeline is exhausted and a non-null `$err` is present, if the next
delegate was a `Next` instance, it was improperly being called as an
http-interop `DelegateInterface`, losing the error argument. As such, if
any parent delegate contained error middleware, it would never be
invoked.
…response prototype is present

I suspected at one point that callable middleware was being decorated
as interop middleware, which would cause problems with manipulated
responses. It was not, but this test proves it.
@weierophinney weierophinney added this to the 1.3.1 milestone Nov 11, 2016
@weierophinney weierophinney merged commit 3360255 into zendframework:master Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
Forward port #85

Conflicts:
	CHANGELOG.md
	src/Next.php
	test/MiddlewarePipeTest.php
	test/NextTest.php
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant