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

zend-expressive 3.0.0alpha9

Compare
Choose a tag to compare
@weierophinney weierophinney released this 22 Feb 21:23
· 358 commits to master since this release

Added

  • #562 adds the class Zend\Expressive\Response\ServerRequestErrorResponseGenerator, and maps it to the Zend\Expressive\Container\ServerRequestErrorResponseGeneratorFactory. The class generates an error response when an exeption occurs producing a server request instance, and can be optionally templated.

Changed

  • #568 updates the zendframework/zend-stratigility dependency to require at least 3.0.0alpha4.

  • #568 updates the ErrorHandlerFactory to pull the Psr\Http\Message\ResponseInterface service, which returns a factory capable of returning a response instance, and passes it to the Zend\Stratigility\Middleware\ErrorHandler instance it creates, as that class changes in 3.0.0alpha4 such that it now expects a factory instead of an instance.

  • #562 modifies the Zend\Expressive\Container\RequestHandlerRunnerFactory to depend on the Zend\Expressive\Response\ServerRequestErrorResponseGenerator service instead of the Zend\Expressive\SERVER_REQUEST_ERROR_RESPONSE_GENERATOR virtual service.

  • #562 extracts most logic from Zend\Expressive\Middleware\ErrorResponseGenerator to a new trait, Zend\Expressive\Response\ErrorResponseGeneratorTrait. A trait was used as the classes consuming it are from different namespaces, and thus different inheritance trees. The trait is used by both the ErrorResponseGenerator and the new ServerRequestErrorResponseGenerator.

Deprecated

  • Nothing.

Removed

  • #562 removes the constant Zend\Expressive\SERVER_REQUEST_ERROR_RESPONSE_GENERATOR. It was only used internally previously.

Fixed

  • Nothing.