enm/json-api-server-bundle
Symfony integration for enm/json-api-server that wires JSON:API handling into your project. Configure bundles, routing, and optional URL prefixes, register request handlers via service tags by resource type, and get built-in error handling for all standard JSON:API endpoints.
Framing correction — this is not a Laravel package. enm/json-api-server-bundle is a Symfony bundle that wires the framework-agnostic enm/json-api-server core into a Symfony kernel: bundle registration in config/bundles.php, YAML config (debug, url_prefix, route_name_prefix), predefined routing imported from routing.xml, and request handlers registered via the json_api_server.request_handler service tag keyed by JSON:API resource type. None of that glue — service container tagging, YAML routing, bundle bootstrapping — exists in Laravel. For a Laravel target the architecture fit is effectively zero; the only transferable asset is the conceptual model of the core library (resources, handlers, compound documents, error objects).
Architecture fit (Symfony path). Conceptually sound: this is the canonical integration for a JSON:API server implementation, and the design — one action (jsonApiAction), routing driven by {type}, handlers as services — is a reasonable separation of transport from domain. But the temporal fit is poor: last release 2018-09-27, repository archived, Travis CI badge pointing at a defunct service, ~10 stars, 0 dependents. This is a Symfony 3.4/4.x-era artifact whose routing model (GET /{type}, /{type}/{id}, relationship endpoints) was designed before the framework's modern routing and DI conventions settled.
Integration feasibility. Low without a fork. Expect composer.json constraints around PHP 7.x and Symfony 3/4; PHP 8.1/8.2 and Symfony 6/7 will likely break on deprecations, return types, container compilation passes (note 3.0.0 already removed ResourceProviderPass, JsonApiLoader, and JsonApiServerDecorator, so the internals churned right before archival). Feasibility improves only if we vendor a fork under our namespace with our own CI, or isolate it in a legacy container.
Technical risk, ranked:
Key questions:
enm/json-api-server install cleanly today, and what does a dependency audit return?Stack fit — the decision gate. Laravel: reject as a dependency; at most mine it as a design reference for a Laravel-native implementation (Laravel JSON:API packages, or a thin resource/serializer layer plus a documented error format). Symfony: conditionally viable, via fork only. Do not attempt to port the bundle's Symfony glue into Laravel — you would be rewriting the whole value proposition.
Migration path (assuming Symfony and a hard JSON:API requirement):
internal/1.0.0, register as a VCS/path repository. Never pull this from Packagist in production.ApiDocumentBuilder) so vendor code is swappable. Highest-value engineering step — it converts a hard dependency into a replaceable one.type at a time.Compatibility checklist before committing: composer.json PHP/Symfony constraints; which PSR-7 implementation the core requires; presence of symfony/psr-http-message-bridge; and whether routing depends on {type} in the URL path — the config explicitly couples url_prefix and route_name_prefix to routing, which complicates running old and new endpoints side by side.
Sequencing: spike (2–3 days: one resource end-to-end — routing, handler, relationships, error handling) → go/no-go decision recorded in an ADR → if go, fork + CI + compatibility ladder → decoupling interface → incremental migration to a maintained target. If no-go, keep the spike as the reference design and build a thin internal layer.
Maintenance. Effectively 100% ours. There is no upstream release cadence, no security advisory channel, and no maintainer to escalate to. Budget explicitly for a named owner, a periodic dependency audit, and a standing line item for PHP/Symfony upgrade work that produces no product value.
Support. No vendor, no SLA, no community. Incident triage on a JSON:API serialization bug means reading the 2018 source. If the GitHub Pages documentation domain lapses, the primary reference disappears — mirror the docs into our fork on day one.
Scaling. The bundle is thin (routing + container wiring + exception-to-error mapping), so its own scaling cost is negligible; throughput is governed by the core library and our request handlers. The scaling risk is organizational, not infrastructural: the number of engineers who can safely modify this layer will stay small, which caps parallel work on the API surface.
Failure modes to plan for:
type tag attribute yields missing routes rather than a compile error; add a container-compile assertion that every registered type maps to an expected resource.{type} prefix swallows URL space; audit existing routes before import.Ramp-up. On a Symfony team already fluent in the core library's resource/handler model, roughly a sprint to first productive endpoint plus the fork/CI setup. On a Laravel team, ramp-up is not the issue — there is nothing to ramp up on, because the integration is unusable; the realistic cost is the spike plus the build of a Laravel-native equivalent. Either way, treat this as a timeboxed evaluation and reference implementation, not an adopted platform dependency.
How can I help you explore Laravel packages today?