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

zend-problem-details 0.5.0

Compare
Choose a tag to compare
@weierophinney weierophinney released this 09 Oct 18:33
· 145 commits to master since this release

Added

  • In #1, Zend\ProblemDetails\ProblemDetailsResponseFactory was updated to attempt to generate a secure-by-default and secure-in-production Problem Details response when the response is generated from an exception; essentially, it now defaults to NOT exposing this information, in order to prevent exposing internals of the application in production.

    To provide this, it adds two new, optional, constructor arguments:

    • bool $exceptionDetailsInResponse is a flag detailing whether or not details from an exception (except ProblemDetailsException custom data) should be used in the Problem Details response; by default this is false
    • string $defaultDetailMessage is a default message to use for the detail key of the response in such situations; the default value is An unknown error occurred..

    Additionally, ProblemDetailsResponseFactoryFactory was updated to re-use the configuration debug setting for the $exceptionDetailsInResponse flag.

  • #7 adds a ProblemDetailsNotFoundHandler class and associated factory. This can be used in place of the default application NotFoundHandler, in addition to it, or within specific routed pipelines in order to provide Problem Details 404 responses.

  • #8 adds Zend\Expressive\ProblemDetails\Exception\ExceptionInterface, a marker interface for exceptions provided by the package.

  • #12 adds support for http-interop/http-middleware 0.5.0 via a polyfill provided by the package webimpress/http-middleware-compatibility. Essentially, this means you can drop this package into an application targeting either the 0.4.1 or 0.5.0 versions of http-middleware, and it will "just work".

Changed

  • #8 renames the interface ProblemDetailsException to ProblemDetailsExceptionInterface. This was done to make the naming consistent with other ZF packages.

  • #8 renames the trait CommonProblemDetailsException to CommonProblemDetailsExceptionTrait. This was done to make the naming consistent with other ZF packages.

  • #8 updates the shipped InvalidResponseBodyException and MissingResponseException to extend the new ExceptionInterface.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.