steffenbrem/json-api-bundle
Symfony bundle for building JSON:API-compliant APIs. Define resources and relationships, integrate Doctrine entities, and get filtering, sorting, pagination, includes, sparse fieldsets, links, validation, and standardized error responses out of the box.
jsonapi.org) versus ad-hoc REST/GraphQL. The bundle enforces the media type, data/included/relationships document shape, sparse fieldsets, sorting, and pagination conventions via JMS Serializer metadata — which turns "should we be spec-compliant?" from a build estimate into a dependency evaluation.include, sparse fieldsets, and linkage reduce round trips and payload size.Consider it when all of the following hold:
Look elsewhere when:
laravel-json-api (actively maintained, Eloquent-native) or plain API Resources plus a thin JSON:API formatter. Adopting a Symfony bundle through a Laravel bridge is a maintenance trap.neomerx/json-api (framework-agnostic, spec-focused), tobscure/json-api, or Laravel's first-party JSON:API package. Any of these beats a 2017 bundle on risk-adjusted cost, even with more integration work.To executives: JSON:API is a published standard for how APIs describe resources, relationships, and errors. Adopting it makes our API predictable for partners and frontend teams and reduces per-client integration work — a real cost line if we ship a partner or mobile API. This specific bundle is the cheapest way to get there if we are on Symfony with JMS Serializer already. The caveats are material: last release 2017, one maintainer, no downstream dependents, no maintenance. My recommendation is not to adopt it as a dependency of record. Fund a short timeboxed spike to validate the JSON:API contract and our serializer mapping, then either vendor a fork we control or implement the same contract on a maintained library. The strategic value is the contract, not the package — we should own the contract regardless of which library produces it.
To engineering: This gives you JSON:API document structure, relationship linkage, include, sparse fieldsets, sorting, and pagination on top of JMS Serializer metadata you likely already have — so less custom serialization code. The cost is that it targets Symfony 2/3-era conventions and PHP versions we have probably moved past, and there will be no upstream fixes. If we proceed: pin exact versions, isolate it behind our own serializer interface so it is replaceable, and cover the document shapes with contract tests. Treat the spike's real deliverable as the mapping and test suite, so a swap costs days rather than a rewrite.
To the product team: Ship the standard, not the vendor. Any decision here should be reversible in one sprint.
How can I help you explore Laravel packages today?