Skip to content

Releases: swisnl/json-api-client

0.12.1

11 Jan 16:21
Compare
Choose a tag to compare

Fixed

  • Fix hydrating of HasOne relations by id using ItemHydrator #44

0.12.0

11 Jan 12:30
Compare
Choose a tag to compare

Added

Changed

  • Add headers to request methods in DocumentClientInterface. #34
    N.B. This is a breaking change if you implement the interface yourself or extend the DocumentClient.
  • Repository doesn't throw exceptions anymore. #41
    N.B. This is a breaking change if you catch DocumentNotFoundException or DocumentTypeException. If you would like the old behaviour, you can simply extend the Repository and implement it yourself.
  • A HasOne or MorphTo relation do not set a [relationship]_id field on the parent when associating a related item. #42

Removed

  • Removed obsolete ItemDocumentSerializer in favor of JsonSerializable.
    N.B. This is a breaking change if you use this class directly, construct the DocumentClient yourself or have overwritten \Swis\JsonApi\Client\Providers\ServiceProvider::registerClients. The ItemDocument can now be serialized using json_encode.
  • Removed obsolete DocumentNotFoundException and DocumentTypeException. #41
    N.B. This is a breaking change if you catch these exceptions.

Fixed

  • Do not fail on, but skip relationships without data #38
  • Dissociating a related item now produces valid JSON #42

0.11.0

21 Dec 11:26
Compare
Choose a tag to compare

Changed

  • Implement JsonSerializable in Document #32
  • Add toArray to DocumentInterface and Document so CollectionDocument and ItemDocument now share the same toArray method #32
    N.B. This will be breaking if you implement the DocumentInterface yourself.

0.10.3

26 Oct 09:28
Compare
Choose a tag to compare

Fixed

  • Omit 'type' attribute when filling attributes for a morph relationship #28

0.10.2

24 Oct 10:58
Compare
Choose a tag to compare

Fixed

  • Allow '0' as id in ItemDocumentBuilder #27

0.10.1

25 Sep 13:17
Compare
Choose a tag to compare

Fixed

  • Add the id when the item has one and not only when it is not new

0.10.0

10 Sep 07:29
Compare
Choose a tag to compare

Added

  • Added Laravel 5.7 support #26

0.9.0

30 Aug 12:05
Compare
Choose a tag to compare

Added

  • Added Laravel 5.6 support #25
  • Travis now runs tests on all supported versions of Laravel #25

0.8.0

14 Aug 15:32
Compare
Choose a tag to compare

This release includes breaking changes to the items. EloquentItem is removed and JenssegersItem is renamed to simply Item. Please update your import statements to reflect these changes.

Changed

  • Refactored name(space) of \Swis\JsonApi\Client\Items\JenssegersItem to \Swis\JsonApi\Client\Item as we only have one item now. #21

Removed

  • EloquentItem is removed because it had some limitations which could not be fixed without being too opinionated. #21
  • NullItem is removed in favor of simply null. This item was only used internally so this should not affect you. #21

0.7.5

04 Jul 08:42
Compare
Choose a tag to compare

Fixed

  • Do not add attributes to item when empty #20