0.15.0
This release includes changes to some interfaces #47. This is a breaking change if you use these interfaces in your own code.
Added
- Added
takemethod toRepositoryto allow fetching resources without id. - Added links and meta to
ItemInterface. - Added
Jsonapiclass. - Added links and meta to
OneRelationInterfaceandManyRelationInterface. - Added
LinkandLinksclasses. - Added links to
Error.
Changed
Error::getMeta()now returns aMetainstance instead of anErrorMetainstance. TheMetaclass does not have thehasandgetmethods, but uses magic overloading methods (e.g.__getand__set) just likeItem.
N.B. This is a breaking change if you use meta on errors.DocumentInterface::getLinks()now returns aLinksinstance instead of a plain array. If no links are present, it returnsnull. All implementations have been updated to reflect these changes.
N.B. This is a minor breaking change if you use links on documents.DocumentInterface::getMeta()now returns aMetainstance instead of a plain array. If no meta is present, it returnsnull. All implementations have been updated to reflect these changes.
N.B. This is a minor breaking change if you use meta on documents.DocumentInterface::getJsonapi()now returns aJsonapiinstance instead of a plain array. If no jsonapi is present, it returnsnull. All implementations have been updated to reflect these changes.- Parameters for
ItemInterface::setRelation()have changed to include optionalLinksandMetaobjects. JsonApi\ErrorsParser,JsonApi\HydratorandJsonApi\Parserhave an extra dependency in their constructor.
N.B. Make sure to add this dependency if you've overwrittenServiceProvider::registerParseror construct theJsonApi\Parseryourself.
Removed
- Removed
ErrorMetaclass in favor of genericMetaclass.
Fixed
- Fixed parsing of JSON:API object in document.