All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning and this changelog format.
- Allow
laravel-json-api/core
v4 and v5.
- Remove deprecation notices for PHP 8.4.
- Package is now licensed under the MIT License.
- BREAKING Package now requires Laravel 11.
- Minimum PHP version is now
8.2
.
- Debug exception output now includes any previous exceptions.
- #3 Ensure HTTP status is correctly set when the status on a
validation exception is not
422
.
- Upgraded to Laravel 10 and set minimum PHP version to 8.1.
- laravel-json-api#204 Fixed
acceptsMiddleware
functionality when there is no matched route on the request.
- Package now supports Laravel 9.
- Added support for PHP 8.1.
- Package now supports v2 of the
laravel-json-api/core
andlaravel-json-api/validation
dependencies.
Initial stable release, with no changes from 1.0.0-beta.4
.
- When converting an exception to the default JSON:API error, detailed exception information will now be added to the
JSON:API error if the application is running in debug mode. The exception code will be added to the
code
member, and the actual exception message to thedetail
member. Themeta
member will contain the exception class, file, line number and stack trace.
- This package no longer handles the
UnexpectedDocumentException
from thelaravel-json-api/spec
package. The exception has been removed from that package, and it instead throws aJsonApiException
if it cannot decode a JSON string.
- Multiple
accept*
helpers can now be added to the exception parser. This is useful when there are multiple different circumstances where you want to force the parser to render JSON:API errors - for example, if the client accepts JSON or if the current route has theapi
middleware. When multiple accept helpers are used, the parser will render JSON:API errors if any of the helpers returntrue
.
- #1 The
ExceptionParser
now has theacceptsAll()
andacceptsMiddleware()
helper methods, for determining whether JSON:API errors should be rendered.
Initial beta release, no changes since alpha.2
.
- Allow the exception parser to render responses for
application/json
using the parser'sacceptsJson()
method. - Allow a developer to provide a callback to determine if an exception should be rendered as JSON:API via the
parser's
accept()
method.
- BREAKING Made method signatures on the
ExceptionParser
class consistent, so that they now take the exception as the first argument and the request as the second. (Previously some had these the other way round.) This makes the signatures consistent with the order of arguments that Laravel uses when calling render callbacks.
Initial release.