Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.2.1...v5.3.0
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.2.0...v5.2.1
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.1.0...v5.2.0
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.0.2...v5.1.0
composer up laravel-json-api/laravel
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.0.1...v5.0.2
composer up laravel-json-api/laravel
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v5.0.0...v5.0.1
composer require laravel-json-api/laravel --no-update
composer require laravel-json-api/testing --dev --no-update
composer up "laravel-json-api/*" cloudcreativity/json-api-testing
Although this is a major release with a breaking change (see below), the vast majority of applications should be able to upgrade without making any changes. You will only need to make a change if you're directly calling the
authorizeResource()method on a JSON:API HTTP request class.
bool or an Illuminate Auth Response.authorizeResource() method on both resource and query request classes has changed to bool|Response (where response is the Illuminate Auth response). If you are manually calling this method and relying on the return value being a boolean, this change is breaking. However, the vast majority of applications should be able to upgrade without any changes.Full Changelog: https://github.com/laravel-json-api/laravel/compare/v4.1.1...v5.0.0
composer require laravel-json-api/laravel --no-update
composer require laravel-json-api/testing --dev --no-update
composer up "laravel-json-api/*" "cloudcreativity/json-api-testing"
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v4.1.0...v4.1.1
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
self link in related resource responses, and remove related link that should not exist. This has been incorrect for some time, but is definitely what the spec defines here.Full Changelog: https://github.com/laravel-json-api/laravel/compare/v4.0.0...v4.1.0
composer require laravel-json-api/laravel:^4.0 --no-update
composer require laravel-json-api/testing:^3.0 --dev --no-update
composer up "cloudcreativity/*" "laravel-json-api/*"
8.2.Full Changelog: https://github.com/laravel-json-api/laravel/compare/v3.4.0...v4.0.0
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v3.3.0...v3.4.0
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Full Changelog: https://github.com/laravel-json-api/laravel/compare/v3.2.0...v3.3.0
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
ulid() method to the ID field class.composer require laravel-json-api/laravel --no-update
composer require laravel-json-api/testing --dev --no-update
composer up "laravel-json-api/*" cloudcreativity/json-api-testing
8.1.laravel-json-api/cursor-pagination package, you now need to passed the schema's id field to the paginator's make() method. I.e. use CursorPagination::make($this->id())Accept header for a "delete" resource request. Previously there was no checking of the Accept media type, so anything could be sent. This is incorrect as the JSON:API specification shows the Accept header as application/vnd.api+json for delete resource requests.composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
MultiPaginator that allows a schema to offer multiple different pagination strategies.fieldspagefiltercomposer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
fields query parameter, e.g. /api/v1/employees?fields[employees]=.composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
canEagerLoad() method.WhereNull and WhereNotNull filters.404 Not Found scenario).laravel-json-api/validation dependency.composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
JsonApiException class now has a context() method. Laravel's exception handler uses this to add log context when the exception is logged. This means logging of JSON:API exceptions will now include the HTTP status code and the JSON:API errors.406 Not Acceptable and 415 Unsupported Media Type messages to the following two new exception classes:
Exceptions\HttpNotAcceptableExceptionExceptions\HttpUnsupportedMediaTypeExceptionAccept header with the media type application/json is rejected with a 406 Not Acceptable response. Previously this media type worked, which is incorrect as the JSON:API specification requires the media type application/vnd.api+json.null for a to-one relationship update.composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
composer require laravel-json-api/laravel --no-update
composer up laravel-json-api/*
"0".composer require laravel-json-api/laravel --no-update
composer up laravel-json-api/*
toOne() or toMany() methods on the resource request class.Number field can now be configured to accept numeric strings by calling the acceptStrings() method on the field.Refer to the upgrade guide on our website.
readonly as a keyword. It was therefore necessary to rename the following interface and trait:
LaravelJsonApi\Eloquent\Contracts\ReadOnly is now IsReadOnly.LaravelJsonApi\Eloquent\Fields\Concerns\ReadOnly is now IsReadOnly.Server class in an application:
LaravelJsonApi\Core\Support\AppResolver.$container property has been removed, and the $app property is now private. To access the current application instance in your server class, use $this->app() instead.model() and modelOrFail() methods on the ResourceQuery request class have been changed from public to protected. These were not documented for use on this query class, and were only intended to be used publicly on the ResourceRequest class. Although technically breaking, this change is unlikely to affect the vast majority of applications which should not be using the method.composer require laravel-json-api/laravel --no-update
composer up laravel-json-api/*
LaravelJsonApi\Laravel\LaravelJsonApi::defaultResource() method. This should be set in a service provider's register() method.JsonApiResource class now has a protected serializeRelation method that can be used to override the default serialization of relationships if needed.self routes will now include any non-standard links set on the resource relationship in the top-level links member.JsonApiResource now correctly handles conditional fields when iterating over relationships to find a specific relation.self route now handles a relationship not existing if it is hidden. Previously an exception was thrown when attempting to merge relationship links into the document.self and related relationship links.composer up laravel-json-api/*
WhereHas and WhereDoesntHave filters. Previously these were not iterating over the filters from the correct resource schema - they were iterating over the filters from the schema to which the relationship belonged. They now correctly iterate over the filters from the schema for the resource that is on the inverse side of the relationship.Finally, our initial stable release. Yes there's more features to work on, but this package is definitely production ready - so here at last is a stable release!
composer require laravel-json-api/laravel --no-update
composer require laravel-json-api/testing --dev --no-update
composer up laravel-json-api/* cloudcreativity/json-api-testing
Has, WhereHas, WhereDoesntHave. Refer to the filter documentation for details.canCount() method on a relationship. Refer to the Countable relationships chapter in the documentation for more details.1.x release cycle. If you are already using our cursor implementation, you can migrate in two easy steps:
composer require laravel-json-api/cursor-paginationLaravelJsonApi\Eloquent\Pagination\CursorPagination to LaravelJsonApi\CursorPagination\CursorPagination.showRelated() and showRelationship() methods. Previously both these controller actions were authorized via the single showRelationship() method. Adding the new showRelated method means developers can now implement separate authorization logic for these two actions if desired. Our default implementation remains unchanged - both are authorized using the view<RelationshipName> method on the relevant policy.isCreatingOrUpdating() helper method to determine whether the request is to create or updated a resource.meta member.extractUsing() callback. This receives the model, column name and value. This is useful if the developer needs to control the serialization of a few fields on their schema. However, the recommendation is to use a resource class for complete control over the serialization of a model to a JSON:API resource.8.30. This change was required to use the $stopOnFirstFailure property on Laravel's FormRequest class.LaravelJsonApi\Spec\UnexpectedDocumentException which was thrown if there was a failure when decoding request JSON content before parsing it for compliance with the JSON:API specification. A JsonApiException will now be thrown instead.201 Created response.How can I help you explore Laravel packages today?