Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Json Api Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API contract standardization. Deciding whether to expose a spec-compliant JSON:API surface (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.
  • Build vs. buy for serialization. The alternative is hand-writing transformers, include-resolution logic, and error-object formatting. This package is a candidate "buy" for teams already on JMS Serializer who would otherwise spend weeks on relationship inclusion and compound documents.
  • Public / partner API roadmap. JSON:API compliance is a genuine differentiator when third parties, mobile clients, or JSON:API-native frontends (Ember Data, and various JS clients) are on the roadmap: one stable contract, less per-client bespoke mapping.
  • Resource-graph use cases. The payoff is highest for read-heavy APIs with rich relationships (orders → line items → products) where include, sparse fieldsets, and linkage reduce round trips and payload size.
  • Stack-fit decision. This is a Symfony bundle, not a Laravel package. For a Laravel codebase the decision is effectively "no" unless you are running a Symfony service; do not let the framing of "PHP package" blur that. For legacy Symfony 2/3 services on JMS Serializer, it is a viable shortcut.
  • Opportunity signal, read carefully. The high opportunity score reflects thin, unmaintained competition in PHP JSON:API tooling — not proven demand. It supports a spike, not a roadmap commitment.

When to Consider This Package

Consider it when all of the following hold:

  • You are on a Symfony application, roughly the Symfony 2.8/3.x era, with a compatible PHP version (this predates Symfony 4/5/6 conventions).
  • JMS Serializer is already in the stack and its metadata/annotations are already used — the bundle's value is largely in reusing that mapping rather than introducing a second serialization layer.
  • You need spec-compliant JSON:API output in weeks, not a bespoke format that merely resembles it.
  • The surface is internal or a bounded integration where a stale dependency is acceptable, and you can pin versions and own a fork.
  • You are willing to write contract tests around document shape, since the upstream project will not catch regressions for you.

Look elsewhere when:

  • Any new greenfield project. Last release was 2017; zero dependents; a single maintainer; effectively no community backstop. Unmaintained serializer-adjacent code is a security and upgrade liability.
  • You are on Laravel. Use 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.
  • You need modern PHP/Symfony support, attributes over annotations, PSR-7/PSR-15 middleware, or OpenAPI coexistence — none of which this bundle will give you.
  • You only need JSON transformation, not the JSON:API spec. Fractal or a small set of hand-written resources is cheaper to reason about and to hire for.
  • Alternatives are viable: 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.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel