neomerx/json-api
Framework-agnostic PHP library implementing JSON:API v1.1. Builds compliant documents, relationships, compound includes, meta and errors. Parses/validates Accept/Content-Type and query params (pagination, sorting, sparse fields) to return proper 415/406 responses.
BaseQueryParser::getIncludes method for easier usage with Encoder::withIncludedPaths (#243)Overall, versions 3 and 4 are nearly identical and the main changes were made in SchemaInterface. An extra parameter ContextInterface was added to SchemaInterface::getAttributes and SchemaInterface::getRelationships.
The context contains extra information about the resource such as its position in the data tree and encoder options such as filter fieldset and included paths. The context might be used for smarter loading resources from a database.
More in Upgrade Notes.
Improved/fixed setting up include paths #238
Identifiers in arrays (e.g. to-many and belongs-to-many relationships) #235.Thanks to contributions and ideas from @PabloKowalczyk performance increased for 10%+ #227 #228
getRelationships to be compliant with the spec #217BaseQueryParser refactored into PHP trait for better flexibility #204Error improved for easier conversion and encoding of custom errors/exceptions to JSON API Errors #206comments is requested it will also include relationships comment, commen, comme, ..., and c #200comments is requested it will also include relationships comment, commen, comme, ..., and c #200Content-Type header will not be added to Responses without content #184ErrorCollection to indicate issues with attributes field #181id property #175How can I help you explore Laravel packages today?