Skip to content

0.19.0

Choose a tag to compare

@JaZo JaZo released this 10 Jul 13:57
· 251 commits to master since this release

This is a big release to improve the overall code quality and align some inconsistencies. Please note it includes several breaking changes so read through all changes carefully when upgrading!

Added

  • Added DocumentFactory #52.
  • Added facades for DocumentFactory, DocumentParser, ItemHydrator, ResponseParser and TypeMapper.
  • Added DocumentParserInterface and ResponseParserInterface interfaces and implementations #54.

Changed

  • The TypeMapper now checks if the class exists in the setter instead of the getter.
  • The ItemHydrator now also hydrates the id if provided #53.
  • Added hasType, hasAttributes, hasRelationships and getRelations to ItemInterface #53.
  • Removed canBeIncluded and getIncluded from ItemInterface as the DocumentFactory is now responsible for gathering the included items #53.
  • Renamed getRelationship to getRelation, hasRelationship to hasRelation and removeRelationship to unsetRelation in Item #53.
  • Renamed/aligned some parameters in several relation methods in Item #53.
  • Renamed namespace Swis\JsonApi\Client\Traits to Swis\JsonApi\Client\Concerns #53.
  • Renamed namespace Swis\JsonApi\Client\JsonApi to Swis\JsonApi\Client\Parsers #54.
  • Renamed ServiceProvider::registerParser (singular) to ServiceProvider::registerParsers (plural) #54.

Removed

  • Removed CollectionDocumentBuilder and ItemDocumentBuilder in favor of DocumentFactory #52.
  • Removed ParserInterface in favor of DocumentParserInterface and ResponseParserInterface #54.