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
take
method toRepository
to allow fetching resources without id. - Added links and meta to
ItemInterface
. - Added
Jsonapi
class. - Added links and meta to
OneRelationInterface
andManyRelationInterface
. - Added
Link
andLinks
classes. - Added links to
Error
.
Changed
Error::getMeta()
now returns aMeta
instance instead of anErrorMeta
instance. TheMeta
class does not have thehas
andget
methods, but uses magic overloading methods (e.g.__get
and__set
) just likeItem
.
N.B. This is a breaking change if you use meta on errors.DocumentInterface::getLinks()
now returns aLinks
instance 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 aMeta
instance 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 aJsonapi
instance 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 optionalLinks
andMeta
objects. JsonApi\ErrorsParser
,JsonApi\Hydrator
andJsonApi\Parser
have an extra dependency in their constructor.
N.B. Make sure to add this dependency if you've overwrittenServiceProvider::registerParser
or construct theJsonApi\Parser
yourself.
Removed
- Removed
ErrorMeta
class in favor of genericMeta
class.
Fixed
- Fixed parsing of JSON:API object in document.