Swisnl Json Api Client Versions Save

A PHP package for mapping remote {json:api} resources to Eloquent like models and collections.

1.3.1

3 years ago

Fixed

  • Do not prepend the base uri if the endpoint is already absolute #82.

1.3.0

3 years ago

Added

  • Added factory methods to DocumentClient, ResponseParser and DocumentParser. This will make it easier to use these without an IOC container. See the (updated) readme for usage instructions. #79

1.2.0

3 years ago

Added

  • Added support for Laravel 8 #81.

1.1.1

3 years ago

Fixed

  • Document, Jsonapi, Links and Meta classes will be serialized as object when empty.
  • Properly handle relations without data #78.

1.1.0

4 years ago

Added

  • Added support for Laravel 7 #75.

1.0.2

4 years ago

Fixed

  • Do not break out of loop when hydrating relations #71.

1.0.1

4 years ago

Fixed

  • Do not require error links object to contain an about member #69.

1.0.0

4 years ago

The first stable release! 🎉 This release includes some bugfixes and changes in order to align with the specification.

Changed

  • Reworded ValidationException messages to align them with the wordings used in the specification.
  • DocumentParser throws a ValidationException when it encounters duplicate resources #64.
  • TypeMapperInterface and TypeMapper are now registered as the same singleton #65.

Fixed

  • ItemHydrator unsets a relation when null (singular) or empty array (plural) instead of hydrating a relation with id null #67.

1.0.0-beta.3

4 years ago

Fixed

  • Fixed parsing of empty singular relationships #63.

1.0.0-beta.2

4 years ago

This release includes a small breaking change because we switched from PHP-HTTP to PSR-18, its successor. Almost all PHP-HTTP clients now implement PSR-18, so this should not be a big problem. This also means for example that PSR exceptions are thrown instead of PHP-HTTP exceptions. If you are relying on some PHP-HTTP classes yourself, make sure to review your code and change those to their PSR equivalent. If you are using this package within a Laravel application, it is important to note that we also changed the way how you can bind your own HTTP client. Please see the documentation and compare all code changes for more details!

Added

  • Added support for Laravel 6 #61.

Changed

  • Switched from PHP-HTTP to PSR-18, its successor #60.
  • The \Swis\JsonApi\Client\Client now uses php-http/discovery itself instead of the service provider. This should make usage without Laravel easier #60.
  • Removed the $baseUri parameter from \Swis\JsonApi\Client\Client::__construct(), use \Swis\JsonApi\Client\Client::setBaseUri() instead #60.

Removed

  • Removed \Swis\JsonApi\Client\Providers\ServiceProvider::getHttpClient() and \Swis\JsonApi\Client\Providers\ServiceProvider::getMessageFactory() as the client now discovers these classes itself. Custom HTTP clients must now be registered within your own service provider using a custom container binding #60.

Fixed

  • Self and related links can not be null #59.
  • Error links MUST have about link. Relationship links MUST have either self or related link #59.
  • Links has to be an object.