prooph / psr7-middleware

Consume prooph messages with a PSR7 middleware
http://getprooph.org/
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

Use $next instead of return $response so other middlewares can be executed #11

Closed sandrokeil closed 7 years ago

sandrokeil commented 8 years ago

We should always call $next instead of returning the response directly to allow, that other middlewares can be executed after the prooph middlewares. Here is the rule

  1. Return $response only if an error is occured
  2. Otherwise call always $next with the new response

What do you think?

basz commented 7 years ago

consider https://github.com/http-interop/http-middleware

sandrokeil commented 7 years ago

Close this in favor of #21 which solves this issue.