Releases: laravel-json-api/laravel
Releases · laravel-json-api/laravel
v4.1.0
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Fixed
- core#17 Fix incorrect
self
link in related resource responses, and removerelated
link that should not exist. This has been incorrect for some time, but is definitely what the spec defines here. - eloquent#36 Support Eloquent dynamic relationships.
Full Changelog: v4.0.0...v4.1.0
v4.0.0 - Laravel 11
Upgrading
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/*"
What's Changed
- Feature: upgrade to Laravel 11 and drop PHP 8.1 by @lindyhopchris in #267
Changelog
Changed
- Package is now licensed under the MIT License.
- BREAKING Package now requires Laravel 11.
- Minimum PHP version is now
8.2
.
Full Changelog: v3.4.0...v4.0.0
v3.4.0
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
What's Changed
- feat: add support to replace model in resource stub by @RobChatloop in #272
New Contributors
- @RobChatloop made their first contribution in #272
Full Changelog: v3.3.0...v3.4.0
v3.3.0
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
What's Changed
- Feature: allow middleware registration per action on resource and relations by @lindyhopchris in #268
Full Changelog: v3.2.0...v3.3.0
Route registration and exception improvements
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Added
- Exceptions converted to JSON:API errors when debug mode is on now include all previous exceptions.
Changed
- Registering routes no longer results in the server instance being thread-cached. This more accurately reflects
production environments, where routes would be cached so there would be no thread-cached JSON:API server when handling
a HTTP request. This means tests (and development environments where routes are not cached) more accurately behave in
the same way as production environments. - Exceptions thrown during the encoding process are no longer caught and re-thrown as previous exceptions. This is due
to the number of questions we receive from developers who do not check previous exceptions, despite exception messages
stating that there is a previous exception to look at.
ULID helper method on ID field
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Added
- core#12 Add
ulid()
method to theID
field class.
Laravel 10 on Valentine's Day
Upgrading
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
Changelog
Changed
- Upgraded to Laravel 10 and set minimum PHP version to
8.1
. - BREAKING If using the
laravel-json-api/cursor-pagination
package, you now need to passed the schema'sid
field to the paginator'smake()
method. I.e. useCursorPagination::make($this->id())
Fixed
- BREAKING #190 The JSON:API media type now needs to be sent in the
Accept
header for a "delete" resource request. Previously there was no checking of theAccept
media type, so anything could be sent. This is incorrect as the JSON:API specification shows theAccept
header asapplication/vnd.api+json
for delete resource requests.
Add multi-paginator plus validation bugfix
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Added
- New
MultiPaginator
that allows a schema to offer multiple different pagination strategies.
Fixed
- The JSON:API rule validators for the follow query parameter fields all errored if a non-array value was provided. This is now fixed:
fields
page
filter
Fix fields query parameter validation
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Fixed
- #225 Fix validation of empty field list for a resource type in the
fields
query parameter, e.g./api/v1/employees?fields[employees]=
.
Fix stale state on Eloquent models after write operation
Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Fixed
- #223 Ensure Eloquent models always have fresh data after write operation. This is to prevent cached relationships from having "stale" data after the write operation. This can occur if a related model's attributes change during the write operation, but the related model was cached before the write operation occurred.