Skip to content

Releases: weierophinney/problem-details

weierophinney/problem-details 0.2.1

13 Jun 19:43
Compare
Choose a tag to compare

Added

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #5 updates the response factory and middleware to treat lack of/empty Accept header values as */*, per RFC-7231 section 5.3.2.

weierophinney/problem-details 0.2.0

30 May 15:39
Compare
Choose a tag to compare

Added

  • #4 adds ProblemDetailsReponseFactoryFactory for generating a ProblemDetailsResponseFactory instance.

Changed

  • #4 changes the ProblemDetailsResponseFactory in several ways:

    • It is now instantiable. The constructor accepts a boolean indicating debug status (false by default), an integer bitmask of JSON encoding flags, a PSR-7 ResponseInterface instance, and a callable factory for generating a writable PSR-7 StreamInterface for the final problem details response content.
    • createResponse() is now an instance method, and its first argument is no longer an Accept header, but a PSR-7 ServerRequestInterface instance.
    • createResponseFromThrowable() is now an instance method, and its first argument is no longer an Accept header, but a PSR-7 ServerRequestInterface instance.
  • #4 changes the ProblemDetailsMiddleware; it now composes a ProblemDetailsResponseFactory insteead of an isDebug flag. Additionally, it no longer wraps processing of the delegate in a try/catch block if the request cannot accept JSON or XML.

  • #4 changes the ProblemDetailsMiddlewareFactory to inject the ProblemDetailsMiddleware with a ProblemDetailsResponseFactory instead of an isDebug flag.

Deprecated

  • Nothing.

Removed

  • #4 removes the ProblemDetailsJsonResponse; use the ProblemDetailsResponseFactory instead.

  • #4 removes the ProblemDetailsXmlResponse; use the ProblemDetailsResponseFactory instead.

  • #4 removes the CommonProblemDetails trait; the logic is now incorporated in the ProblemDetailsResponseFactory.

  • #4 removes the ProblemDetailsResponse interface; PSR-7 response prototypes are now used instead.

Fixed

  • #4 updates JSON response generation to allow specifying your own JSON encoding flags. By default, it now does pretty JSON, with unescaped slashes and unicode.

problem-details 0.1.1

08 May 16:57
Compare
Choose a tag to compare

Changes

  • Updated willdurand/negotiation dependency to stable ^2.3, which now allows wildcard marching of + segments of subtypes.