zend-problem-details 0.5.0
Added
-
In #1,
Zend\ProblemDetails\ProblemDetailsResponseFactorywas 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 $exceptionDetailsInResponseis a flag detailing whether or not details from an exception (exceptProblemDetailsExceptioncustom data) should be used in the Problem Details response; by default this isfalsestring $defaultDetailMessageis a default message to use for thedetailkey of the response in such situations; the default value isAn unknown error occurred..
Additionally,
ProblemDetailsResponseFactoryFactorywas updated to re-use the configurationdebugsetting for the$exceptionDetailsInResponseflag. -
#7 adds a
ProblemDetailsNotFoundHandlerclass and associated factory. This can be used in place of the default applicationNotFoundHandler, 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
ProblemDetailsExceptiontoProblemDetailsExceptionInterface. This was done to make the naming consistent with other ZF packages. -
#8 renames the trait
CommonProblemDetailsExceptiontoCommonProblemDetailsExceptionTrait. This was done to make the naming consistent with other ZF packages. -
#8 updates the shipped
InvalidResponseBodyExceptionandMissingResponseExceptionto extend the newExceptionInterface.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.