Skip to content

Releases: woohoolabs/yin

0.10.2

29 Feb 19:47
Compare
Choose a tag to compare

ADDED:

  • Missing sections to the read me file

CHANGED:

  • #8: Pass attribute name to the attribute transformer
  • #11: Pass relationship name to the relationship transformer
  • #10: Pass attribute name to the attribute hydrator closure
  • #13: Pass relationship name to the relationship hydrator
  • #14: Expect callables instead of closures for hydrators/transformers
  • #7: More intuitive example URL-s

FIXED:

  • #6: Fixed examples in order not to throw fatal error
  • #16: ResourceIdentifier does not consider "data" key

0.10.1

21 Jan 19:34
Compare
Choose a tag to compare

FIXED:

  • GH-5: Attributes and relationships objects are now omitted when empty instead of being serialized as empty arrays

0.10.0

16 Jan 08:25
Compare
Choose a tag to compare

This version incorporates some new methods to easily retrieve the content of the request body and some important bug
fixes. It doesn't contain any breaking changes so updating to v10.0 is highly recommended.

ADDED:

  • AbstractSimpleResourceDocument to define documents containing information about a single resource without
    the need of a resource transformer
  • ClientGeneratedIdRequired exception
  • getResourceAttributes() method to RequestInterface
  • getResourceToOneRelationship() and getResourceToManyRelationship() methods to RequestInterface

CHANGED:

  • TransformerTrait transformations are now type hinted against DateTimeInterface to support DateTimeImmutable

FIXED:

  • Parameter order in AbstractCreateHydrator::hydrate()
  • GH-3: Fixed multi-level relationships
  • Issue when include query param is an empty string

0.9.0

25 Nov 23:27
Compare
Choose a tag to compare

ADDED:

  • Possibility to pass additional meta information for documents when fetching the response
  • Possibility to only load relationship data when the relationship itself is included

CHANGED:

  • Renamed getDefaultRelationships() to getDefaultIncludedRelationships() in transformers to better reflect its meaning
  • The "data" key of relationships won't be present in the response when it is empty
  • Renamed Links::addLinks() to Links::setLinks() and Links::addLink() to Links::setLink()

REMOVED:

  • Most of the Links::create* static methods to simplify creation
  • RelativeLinks class as it became useless

FIXED:

  • Responder::getDocumentResourceResponse() was wrongly called statically
  • PHP version constraint in composer.json

0.8.0

16 Nov 21:48
Compare
Choose a tag to compare

ADDED:

  • Attributes of the resource in the request body can be retrieved easier
  • Even better support for relative links via the RelativeLinks class

CHANGED:

  • ID of the hydrated resource also gets validated when it is missing
  • The provided ExceptionFactory can be used when validating client-generated ID-s for hydration
  • Renamed RequestInterface::getBodyData* methods to RequestInterface::getResource*

FIXED:

  • Methods of TransformerTrait were intended to be non-static

0.7.1

05 Oct 19:16
Compare
Choose a tag to compare

ADDED:

  • ApplicationError and ResourceNotFound
  • Mentioning optional Composer dependencies in the readme

0.7.0

04 Oct 20:42
Compare
Choose a tag to compare

ADDED:

  • A separate responder class
  • ExceptionFactoryInterface which helps you to fully customize error messages
  • JsonApi::hydrate() helper method to make hydration easier
  • Integrated content negotiation and request/response validation from Woohoo Labs. Yin-Middlewares
  • Even more extensive documentation

CHANGED:

  • JSON API exceptions extend JsonApiException thus they can be catched easier
  • Documents are moved to JsonApi\Document namespace from JsonApi\Transfomer
  • Refactored transformation to fix inclusion of multiple identical resource objects
  • When the data member is missing from the top source, the appropriate exception is thrown

REMOVED:

  • Different types of responses (e.g.: FetchResponse)

FIXED:

  • Compound documents now can't include more than one resource object for each type and id pair
  • Request body was always null
  • Single resource documents didn't contain the data top-level member unless resource ID was 1

0.6.0

22 Sep 19:47
Compare
Choose a tag to compare

ADDED:

  • More convenient handling of inappropriate relationship types during hydration
  • Much more unit tests (320+ tests, 92% coverage)
  • Better and more documentation

CHANGED:

  • Simplified relative links
  • Included resources are now sorted by type and id
  • Renamed AbstractCompoundDocument to AbstractSuccessfulDocument
  • Documents now require a ResourceTransformerInterface instance instead of AbstractResourceTransformer

FIXED:

  • Meta data didn't appear in error objects
  • Empty version information appeared in jsonApi object
  • Constructors of ToOneRelationships and ToManyRelationships were messed up
  • Getters in MediaTypeUnacceptable and MediaTypeUnsupported didn't return the media type name
  • Pagination objects are now correctly instantiated from query parameters
  • Validation of query parameters didn't work
  • Getting the list of included relationships didn't work as expected
  • Status code of error responses was always "500" when the document contained multiple errors
  • Content-Type header media types of responses are now correctly assembled when using extensions
  • Fatal error when the hydrated resource type didn't match the acceptable type
  • Various issues of pagination providers

0.5.0

11 Sep 21:29
Compare
Choose a tag to compare

ADDED:

  • Support for much easier generation of pagination links
  • Shortcut to get the resource ID in an AbstractSingleResourceDocument
  • Support for relative URI-s

CHANGED:

  • Improved transformation performance
  • Included resources are now sorted by type instead of ID

REMOVED:

  • RelationshipRequest became useless, thus it was removed

FIXED:

  • Instantiation of Request could take significant time
  • Sparse fieldsets and inclusion of relationships are now fully compliant with the spec
  • Links with null value can be included in the response

0.4.2

27 Aug 21:46
Compare
Choose a tag to compare

FIXED:

  • Some exceptions had errorous namespaces
  • Request::with* methods returned an instance of PSR ServerRequestInterface
  • Validation of the Content-Type and the Accept headers is now compliant with the spec