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\ProblemDetailsResponseFactory
such 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$responsePrototype
and$streamFactory
arguments are now removed.The
$responseFactory
will be invoked with no arguments, and MUST return a PSR-7 ResponseInterface instance. -
#35 modifies internals of
Zend\ProblemDetails\ProblemDetailsResponseFactoryFactory
as follows:- It no longer looks for a
Zend\ProblemDetails\StreamFactory
service. - It now requires the
Psr\Http\Message\ResponseInterface
service, 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$responseFactory
argument is now required. -
#35 modifies the constructor of
Zend\ProblemDetails\ProblemDetailsNotFoundHandler
; the$responseFactory
argument is now required. -
#34 updates the behavior when passing null as the
$jsonFlag
parameter to theZend\ProblemDetails\ProblemDetailsResponseFactory
constructor; in such situations, the defaultjson_encode()
flags will includeJSON_PRETTY_PRINT
only when the$isDebug
argument is booleantrue
.
Deprecated
- Nothing.
Removed
-
#22 and #30 remove support for both
http-interop/http-middleware
andhttp-interop/http-server-middleware
. -
#22 removes
MissingResponseException
as it cannot be thrown anymore, because interfaces have PHP7 return type andTypeError
will be thrown.
Fixed
- Nothing.