zend-problem-details 0.5.0
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 (exceptProblemDetailsException
custom data) should be used in the Problem Details response; by default this isfalse
string $defaultDetailMessage
is a default message to use for thedetail
key of the response in such situations; the default value isAn unknown error occurred.
.
Additionally,
ProblemDetailsResponseFactoryFactory
was updated to re-use the configurationdebug
setting for the$exceptionDetailsInResponse
flag. -
#7 adds a
ProblemDetailsNotFoundHandler
class 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
ProblemDetailsException
toProblemDetailsExceptionInterface
. This was done to make the naming consistent with other ZF packages. -
#8 renames the trait
CommonProblemDetailsException
toCommonProblemDetailsExceptionTrait
. This was done to make the naming consistent with other ZF packages. -
#8 updates the shipped
InvalidResponseBodyException
andMissingResponseException
to extend the newExceptionInterface
.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.