Closed harikt closed 9 years ago
If this PR is accepted I will open the PR for the rest with the same .
The current code returns a new/fresh response object instead of assuming the injected response object is in a returnable form.
@codeguy I didn't get it . Was you referring the $response injected is new one ? I thought that is how the PSR-7 response works. the with
methods always returns cloned ones.
@harikt I think that as we're in an error situation, we can't assume that the Response object is in a valid state. Hence, the error handler creates a new Response object that it knows is valid and returns that.
@akrabat thanks for making it clear.
As we get the response object there is no need of the application container.
It seems to me that we can remove the code
function ($c) {
also.