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.