Skip to content

Releases: laravel-json-api/laravel

v4.1.0

26 Jun 19:51
Compare
Choose a tag to compare

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 remove related 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

14 Mar 18:12
Compare
Choose a tag to compare

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

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

03 Mar 12:52
Compare
Choose a tag to compare

Upgrading

composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"

What's Changed

New Contributors

Full Changelog: v3.3.0...v3.4.0

v3.3.0

14 Feb 19:18
Compare
Choose a tag to compare

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

08 Nov 18:13
Compare
Choose a tag to compare

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

20 Jul 17:26
Compare
Choose a tag to compare

Upgrading

composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"

Changelog

Added

  • core#12 Add ulid() method to the ID field class.

Laravel 10 on Valentine's Day

14 Feb 19:59
Compare
Choose a tag to compare

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's id field to the paginator's make() method. I.e. use CursorPagination::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 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.

Add multi-paginator plus validation bugfix

09 Feb 20:52
Compare
Choose a tag to compare

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

25 Jan 21:25
Compare
Choose a tag to compare

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

23 Jan 18:10
Compare
Choose a tag to compare

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.