All notable changes to this project will be documented in this file, in reverse chronological order by release.
- #7 adds an explicit dependency on ext/json.
- #7 updates each
of the following to place them under the new
ProblemDetails\Exception
namespace:CommonProblemDetailsException
InvalidResponseBodyException
MissingResponseException
ProblemDetailsException
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- #5 updates the
response factory and middleware to treat lack of/empty
Accept
header values as*/*
, per RFC-7231 section 5.3.2.
- #4 adds
ProblemDetailsReponseFactoryFactory
for generating aProblemDetailsResponseFactory
instance.
-
#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-7ResponseInterface
instance, and a callable factory for generating a writable PSR-7StreamInterface
for the final problem details response content. createResponse()
is now an instance method, and its first argument is no longer anAccept
header, but a PSR-7ServerRequestInterface
instance.createResponseFromThrowable()
is now an instance method, and its first argument is no longer anAccept
header, but a PSR-7ServerRequestInterface
instance.
- It is now instantiable. The constructor accepts a boolean indicating debug
status (
-
#4 changes the
ProblemDetailsMiddleware
; it now composes aProblemDetailsResponseFactory
insteead of anisDebug
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 theProblemDetailsMiddleware
with aProblemDetailsResponseFactory
instead of anisDebug
flag.
- Nothing.
-
#4 removes the
ProblemDetailsJsonResponse
; use theProblemDetailsResponseFactory
instead. -
#4 removes the
ProblemDetailsXmlResponse
; use theProblemDetailsResponseFactory
instead. -
#4 removes the
CommonProblemDetails
trait; the logic is now incorporated in theProblemDetailsResponseFactory
. -
#4 removes the
ProblemDetailsResponse
interface; PSR-7 response prototypes are now used instead.
- #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.
Initial Release.
- Nothing.
- Nothing.
- Nothing.
- Nothing.