Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

zend-problem-details 1.0.0alpha2

Compare
Choose a tag to compare
@weierophinney weierophinney released this 26 Feb 22:52
· 65 commits to master since this release

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 be callable. 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).
  • #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 the Zend\ProblemDetails\ProblemDetailsResponseFactory constructor; in such situations, the default json_encode() flags will include JSON_PRETTY_PRINT only when the $isDebug argument is boolean true.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.