Releases: woohoolabs/yang
Releases · woohoolabs/yang
3.0.0
ADDED:
- Support for PSR-18
CHANGED:
- Increased minimum PHP version requirement to 7.4
- Declare nearly all property types
- #34:
JsonApiClient
implements PSR-18'sClientInterface
- #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
3.0.0-beta1
ADDED:
- #34:
JsonApiClient
implements PSR-18'sClientInterface
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
2.3.1
ADDED:
- Support for PHP 8
- Support for PHPUnit 9
2.3.0
2.2.1
FIXED:
ClassDocumentHydrator::hydrateSingleResource()
returns anobject
instead ofstdClass
2.2.0
ADDED:
AbstractClassDocumentHydrator
as a base class for custom hydrators
CHANGED:
- Increased minimum PHP version requirement to 7.2
ClassDocumentHydrator
is no longer afinal
class
2.1.0
ADDED:
- #13:
DocumentHydratorInterface
andClassDocumentHydrator
in order to fix some issues with theHydratorInterface
andClassHydrator
- #15: New accessor and mutator methods for
WoohooLabs\Yang\JsonApi\Request\ResourceObject
:id()
,setId()
,type()
,setType()
,attributes()
,relationships()
DEPRECATED:
HydratorInterface
: use theDocumentHydratorInterface
insteadClassHydrator
: use theClassDocumentHydrator
instead
2.0.0
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 documentDocument::primaryResource()
throws an exception if the document is a collection or error document or the primary resource is missingDocument::resource()
throws an exception instead of returning null if the requested resource is missingDocument::error()
throws an exception instead of returning null if the document does not contain the requested errorRelationship::resources()
throws an exception instead of returning an empty array if the relationship is a to-oneRelationship::resource()
throws an exception instead of returning null if the relationship is a to-many or emptyRelationship::resourceBy()
throws an exception instead of returning null if the requested resource is missingResourceObject::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
toWoohooLabs\Yang\JsonApi\Schema\Error\Error
WoohooLabs\Yang\JsonApi\Schema\ErrorSource
toWoohooLabs\Yang\JsonApi\Schema\Error\ErrorSource
WoohooLabs\Yang\JsonApi\Schema\Link
toWoohooLabs\Yang\JsonApi\Schema\Link\Link
WoohooLabs\Yang\JsonApi\Schema\ResourceObjects
toWoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjects
WoohooLabs\Yang\JsonApi\Schema\ResourceObject
toWoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObject
- Return separate classes instead of a general
Links
for the different types of links (BREAKING CHANGE):DocumentLinks
when usingDocument::links()
ResourceLinks
when usingResourceObject::links()
RelationshipLinks
when usingRelationship::links()
ErrorLinks
when usingError::links()
JsonSerializer::serialize()
will throw aRequestException
instead ofLogicException
if the body is of invalid type (BREAKING CHANGE)- Rename
JsonApi
toJsonApiObject
(BREAKING CHANGE) - Apply the Woohoo Labs. Coding Standard
REMOVED:
- The generic
Link
class (BREAKING CHANGE)
FIXED:
- Issues with 0 when converting to array