You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Provide a dedicated service for the server request error response generator
Instead of re-using the existing `ErrorResponseGenerator`, this patch
does the following:
- Separates functionality for generating the error response into a
trait, `Zend\Expressive\Response\ErrorResponseGeneratorTrait`. The
method `prepareTemplatedResponse()` now expects the error, the
response, and an array of data to provide to the template.
- Updates `Zend\Expressive\Middleware\ErrorResponseGenerator` to use the
new trait.
- Creates a new class, `Zend\Expressive\Response\ServerRequestErrorResponseGenerator`,
which expects a response factory, and optionally the debug flag,
renderer, and template to render to. It composes the trait, and
generates a response on-the-fly to pass to the trait methods.
The `RequestHandlerRunnerFactory` has been updated to use this new
service, and the `ServerRequestErrorResponseGeneratorFactory` was
updated to generate an instance of the new class.
These changes mean the constant SERVER_REQUEST_ERROR_RESPONSE_GENERATOR
is no longer needed, and was thus removed.
0 commit comments