Releases: woohoolabs/yang
Releases · woohoolabs/yang
2.0.0-beta1
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 default value when using the
ResourceObject::attribute()
method
CHANGED:
- Improve type-safety by eliminating
null
return values (BREAKING):JsonApiResponse::document()
throws an exception instead of returning null if the response doesn't contain a documentDocument::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):
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
Links
for the different types of links (BREAKING):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)- Rename
JsonApi
toJsonApiObject
(BREAKING)
REMOVED:
- The generic
Link
class (BREAKING)
FIXED:
- Issues with 0 when converting to array
1.5.0
ADDED:
- Support for PSR-18 and HTTPlug 2.0
CHANGED:
- Update PHPUnit to 7.0
1.4.1
ADDED:
ClassHydrator::hydrateObject()
method
1.4.0
ADDED:
- Support for hydrating collections via
HydratorInterface::hydrateCollection()
1.3.2
1.3.1
1.2.1
1.3.0
CHANGED:
- Increased minimum PHP version requirement to 7.1
1.2.0
ADDED:
- Ability to hydrate responses to objects via
ClassHydrator
- Ability to retrieve all relationships of a resource via
ResourceObject::getRelationships()