Skip to content

Releases: woohoolabs/yang

3.0.0

06 Sep 09:42
3.0.0
5cbd05d
Compare
Choose a tag to compare

ADDED:

  • Support for PSR-18

CHANGED:

  • Increased minimum PHP version requirement to 7.4
  • Declare nearly all property types
  • #34: JsonApiClient implements PSR-18's ClientInterface
  • #33: Use Psr\Http\Client\ClientInterface as type

REMOVED:

  • Support for php-http/httplug v1
  • The deprecated ClassHydrator
  • The deprecated HydratorInterface

3.0.0-rc1

19 Aug 21:25
3.0.0-rc1
28d6518
Compare
Choose a tag to compare
3.0.0-rc1 Pre-release
Pre-release

CHANGED:

  • #33: Use Psr\Http\Client\ClientInterface as type
  • Declare nearly all property types

REMOVED:

  • Support for php-http/httplug v1

3.0.0-beta1

23 Oct 06:54
3.0.0-beta1
0eacdb5
Compare
Choose a tag to compare
3.0.0-beta1 Pre-release
Pre-release

ADDED:

  • #34: JsonApiClient implements PSR-18's ClientInterface

CHANGED:

  • Increased minimum PHP version requirement to 7.4
  • PSR-18 is used instead of HTTPlug

REMOVED:

  • The deprecated ClassHydrator has been removed
  • The deprecated HydratorInterface has been removed

2.3.2

15 Nov 10:32
2.3.2
da65122
Compare
Choose a tag to compare

ADDED:

  • #31: Allow to set the filter query parameter directly

2.3.1

23 Jun 08:29
2.3.1
3d42d40
Compare
Choose a tag to compare

ADDED:

  • Support for PHP 8
  • Support for PHPUnit 9

2.3.0

24 Apr 09:22
2.3.0
eec07af
Compare
Choose a tag to compare

ADDED:

  • #28: Introduce AttributeHydratorInterface

2.2.1

20 Oct 06:37
2.2.1
40e6a21
Compare
Choose a tag to compare

FIXED:

  • ClassDocumentHydrator::hydrateSingleResource() returns an object instead of stdClass

2.2.0

23 Sep 14:43
2.2.0
acdd0a1
Compare
Choose a tag to compare

ADDED:

  • AbstractClassDocumentHydrator as a base class for custom hydrators

CHANGED:

  • Increased minimum PHP version requirement to 7.2
  • ClassDocumentHydrator is no longer a final class

2.1.0

17 Apr 07:32
2.1.0
eecc2b5
Compare
Choose a tag to compare

ADDED:

  • #13: DocumentHydratorInterface and ClassDocumentHydrator in order to fix some issues with the HydratorInterface and ClassHydrator
  • #15: New accessor and mutator methods for WoohooLabs\Yang\JsonApi\Request\ResourceObject: id(), setId(), type(), setType(), attributes(), relationships()

DEPRECATED:

  • HydratorInterface: use the DocumentHydratorInterface instead
  • ClassHydrator: use the ClassDocumentHydrator instead

2.0.0

04 Mar 16:05
2.0.0
f4bb891
Compare
Choose a tag to compare

Changes since beta1:

CHANGED:

  • Apply the Woohoo Labs. Coding Standard

Full change set:

ADDED:

  • JSON:API 1.1 related features:
    • Support for Profiles
    • Support for type links in errors
  • Document::errorCount() to easily count errors in the document
  • Support for defining a default value when using the ResourceObject::attribute() method

CHANGED:

  • Improve type-safety by eliminating null return values (BREAKING CHANGE):
    • JsonApiResponse::document() throws an exception instead of returning null if the response doesn't contain a document.
    • Document::primaryResources() throws an exception if the document is a single-resource or error document
    • Document::primaryResource() throws an exception if the document is a collection or error document or the primary resource is missing
    • Document::resource() throws an exception instead of returning null if the requested resource is missing
    • Document::error() throws an exception instead of returning null if the document does not contain the requested error
    • Relationship::resources() throws an exception instead of returning an empty array if the relationship is a to-one
    • Relationship::resource() throws an exception instead of returning null if the relationship is a to-many or empty
    • Relationship::resourceBy() throws an exception instead of returning null if the requested resource is missing
    • ResourceObject::relationship() throws an exception instead of returning null if the requested relationship is missing
  • Move errors, links, and resources to their own namespace (BREAKING CHANGE):
    • WoohooLabs\Yang\JsonApi\Schema\Error to WoohooLabs\Yang\JsonApi\Schema\Error\Error
    • WoohooLabs\Yang\JsonApi\Schema\ErrorSource to WoohooLabs\Yang\JsonApi\Schema\Error\ErrorSource
    • WoohooLabs\Yang\JsonApi\Schema\Link to WoohooLabs\Yang\JsonApi\Schema\Link\Link
    • WoohooLabs\Yang\JsonApi\Schema\ResourceObjects to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjects
    • WoohooLabs\Yang\JsonApi\Schema\ResourceObject to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObject
  • Return separate classes instead of a general Links for the different types of links (BREAKING CHANGE):
    • DocumentLinks when using Document::links()
    • ResourceLinks when using ResourceObject::links()
    • RelationshipLinks when using Relationship::links()
    • ErrorLinks when using Error::links()
  • JsonSerializer::serialize() will throw a RequestException instead of LogicException if the body is of invalid type (BREAKING CHANGE)
  • Rename JsonApi to JsonApiObject (BREAKING CHANGE)
  • Apply the Woohoo Labs. Coding Standard

REMOVED:

  • The generic Link class (BREAKING CHANGE)

FIXED:

  • Issues with 0 when converting to array