Releases: zendframework/zend-problem-details
zend-problem-details 1.1.0
Added
- #51 adds a new 
problem-details.default_types_mapconfig option, which can be used to define customtypevalues based on status codes. 
Changed
- Nothing.
 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- Nothing.
 
zend-problem-details 1.0.2
Added
- Nothing.
 
Changed
- Nothing.
 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- #46 adds code to ensure newlines are stripped when creating key names for XML
payloads. 
zend-problem-details 1.0.1
Added
- Nothing.
 
Changed
- Nothing.
 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
zend-problem-details 1.0.0
Added
- #30 adds PSR-15 support.
 
Changed
- 
#24 updates all classes to use scalar and return type hints, including nullable and void types. If you were extending classes within an earlier release, you may need to update signatures of any methods you override.
 - 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsResponseFactorysuch that it now has the following signature:public function __construct( callable $responseFactory, bool $isDebug = self::EXCLUDE_THROWABLE_DETAILS, int $jsonFlags = null, bool $exceptionDetailsInResponse = false, string $defaultDetailMessage = self::DEFAULT_DETAIL_MESSAGE )
Note that the first argument is now a
$responseFactory, is required, and must becallable. The previous$responsePrototypeand$streamFactoryarguments are now removed.The
$responseFactorywill be invoked with no arguments, and MUST return a PSR-7 ResponseInterface instance. - 
#35 modifies internals of
Zend\ProblemDetails\ProblemDetailsResponseFactoryFactoryas follows:- It no longer looks for a 
Zend\ProblemDetails\StreamFactoryservice. - It now requires the 
Psr\Http\Message\ResponseInterfaceservice, and expects it to resolve to a PHP callable capable of producing such an instance (instead of a response instance directly). 
 - It no longer looks for a 
 - 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsMiddleware; the$responseFactoryargument is now required. - 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsNotFoundHandler; the$responseFactoryargument is now required. - 
#34 updates the behavior when passing null as the
$jsonFlagparameter to theZend\ProblemDetails\ProblemDetailsResponseFactoryconstructor; in such situations, the defaultjson_encode()flags will includeJSON_PRETTY_PRINTonly when the$isDebugargument is booleantrue. 
Deprecated
- Nothing.
 
Removed
- 
#22 and #30 remove support for both
http-interop/http-middlewareandhttp-interop/http-server-middleware. - 
#22 removes
MissingResponseExceptionas it cannot be thrown anymore, because interfaces have PHP7 return type andTypeErrorwill be thrown. 
Fixed
- Nothing.
 
zend-problem-details 0.5.3
Added
- Nothing.
 
Changed
- #32 updates the 
ProblemDetailsResponseFactoryFactoryto allow theResponseInterfaceservice to either return an instance, or a factory capable of generating an instance. 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- Nothing.
 
zend-problem-details 1.0.0alpha2
Added
- Nothing.
 
Changed
- 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsResponseFactorysuch that it now has the following signature:public function __construct( callable $responseFactory, bool $isDebug = self::EXCLUDE_THROWABLE_DETAILS, int $jsonFlags = null, bool $exceptionDetailsInResponse = false, string $defaultDetailMessage = self::DEFAULT_DETAIL_MESSAGE )
Note that the first argument is now a
$responseFactory, is required, and must becallable. The previous$responsePrototypeand$streamFactoryarguments are now removed.The
$responseFactorywill be invoked with no arguments, and MUST return a PSR-7 ResponseInterface instance. - 
#35 modifies internals of
Zend\ProblemDetails\ProblemDetailsResponseFactoryFactoryas follows:- It no longer looks for a 
Zend\ProblemDetails\StreamFactoryservice. - It now requires the 
Psr\Http\Message\ResponseInterfaceservice, and expects it to resolve to a PHP callable capable of producing such an instance (instead of a response instance directly). 
 - It no longer looks for a 
 - 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsMiddleware; the$responseFactoryargument is now required. - 
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsNotFoundHandler; the$responseFactoryargument is now required. - 
#34 updates the behavior when passing null as the
$jsonFlagparameter to theZend\ProblemDetails\ProblemDetailsResponseFactoryconstructor; in such situations, the defaultjson_encode()flags will includeJSON_PRETTY_PRINTonly when the$isDebugargument is booleantrue. 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- Nothing.
 
zend-problem-details 1.0.0alpha1
Added
- #30 adds PSR-15 support.
 
Changed
- #24 updates all classes to use scalar and return type hints, including nullable and void types. If you were extending classes within an earlier release, you may need to update signatures of any methods you override.
 
Deprecated
- Nothing.
 
Removed
- 
#22 and #30 remove support for both
http-interop/http-middlewareandhttp-interop/http-server-middleware. - 
#22 removes
MissingResponseExceptionas it cannot be thrown anymore, because interfaces have PHP7 return type andTypeErrorwill be thrown. 
Fixed
- Nothing.
 
zend-problem-details 0.5.2
Added
- 
#29 adds the ability for the
ProblemDetailsMiddlewareto trigger listeners when it catches aThrowableto produce a response. Listeners are PHP callables and receive the following arguments, in the following order:Throwable $error: the throwable/exception caught by theProblemDetailsMiddleware.ServerRequestInterface $request: the request handled by theProblemDetailsMiddleware.ResponseInterface $response: the response generated by theProblemDetailsMiddleware.
Attach listeners using the
ProblemDetailsMiddleware::attachListeners()instance method. 
Changed
- Nothing.
 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- Nothing.
 
zend-problem-details 0.5.1
Added
- Nothing.
 
Changed
- Nothing.
 
Deprecated
- Nothing.
 
Removed
- Nothing.
 
Fixed
- 
#20 fixes an issue with serialization when PHP resources are within the
$additionalaspect of the payload. When these values are encountered, the response factory now will instead returnResource of type {resource type}. - 
#21 provides a defence for
$additionaldata keys that would otherwise create malformed XML tag names. 
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.