zend-problem-details 1.0.0alpha2
Added
- Nothing.
Changed
-
#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
- Nothing.
Fixed
- Nothing.