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 Server Laravel Package

enm/json-api-server

Abstract server-side PHP implementation of the JSON:API specification, built on enm/json-api-common. Provides endpoints, request handling, and exception handling for building JSON:API-compliant APIs in Laravel or any PHP application.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. enm/json-api-server is a framework-agnostic, abstract PHP library that implements the transport/serialization layer of the JSON:API specification (jsonapi.org). It is explicitly not a Laravel package: there are no service providers, config files, facades, or Artisan commands. A Laravel application would consume it as a plain Composer dependency wrapped by a thin adapter layer. The design assumes you build your own resource classes (extending/extending-like AbstractResource), endpoint classes, and request-handler wiring. It shares foundational structures with its sibling enm/json-api-common, which you must read first to understand the model. There is no Eloquent integration, no automatic model-to-resource mapping, and no relationship traversal out of the box — you write those. Fit is therefore medium-to-low for a conventional Laravel team expecting a drop-in JSON:API package, but reasonable for a team wanting strict spec compliance with full control over schema.

Integration feasibility. Composer installation is trivial (composer require enm/json-api-server) and MIT-licensed. The real cost is implementation: you must author resource classes, endpoint definitions, request handlers, and exception-to-error mappings to satisfy the spec. The Request Handler and Exception handling docs suggest a coherent extension model, but the library is abstract by design, so "feasible" depends on whether your team is willing to build the concrete layer. Because it is Laravel-adjacent rather than Laravel-native, all routing, middleware, auth, and dependency injection must be bridged manually — likely via a custom service provider and route group.

Technical risk. This is the material concern. The package is archived and its last release was 2018-10-29. That places it in the PHP 7.x era; compatibility with PHP 8.x (and therefore modern Laravel 10/11) is unverified and likely to require patching. It has 12 stars and 0 dependents, so the community surface area is effectively zero — no Stack Overflow corpus, no third-party tutorials, no active security response. Being archived means no upstream fixes, so any PHP 8 deprecation or spec amendment is yours to patch in a fork. The abstraction itself is sound (the JSON:API spec is stable), which lowers design risk but not maintenance risk. Combined with a 0.39 quality score, I would treat this as "adopt with a fork-and-own posture" rather than "adopt as a dependency."

Key questions.

  1. Does any maintained release actually install and pass tests on our target PHP/Laravel versions, or will we fork on day one?
  2. Does the JSON:API spec surface this library exposes (compound documents, sparse fieldsets, sorting, pagination, filtering) cover our product requirements, or will we fight the abstraction?
  3. What is the concrete maintenance burden of a fork — how many files reference deprecated PHP 7 idioms?
  4. Is JSON:API the right contract for our API consumers at all, versus simpler REST or GraphQL?
  5. Do we have an owner who will accept custodianship of an archived dependency?

Integration Approach

Stack fit. Poor-to-moderate out of the box. Laravel teams expect packages aligned with Laravel conventions (Eloquent resources like laravel-json-api or spatie/laravel-fractal). This library sits below that abstraction, closer to a serializer/deserializer toolkit. It maps cleanly onto a layered design (Controller → Request Handler → Resource → serializer) but requires us to supply every layer. If the team is comfortable owning a JSON:API layer, fit improves; if they want batteries-included, it does not.

Migration path. Treat it as a greenfield JSON:API endpoint, not a retrofit. Recommended path: (1) fork the repo and verify PHP 8/Laravel compatibility in isolation; (2) prototype one resource end-to-end to measure the concrete-layer effort; (3) if the prototype succeeds, build an adapter package (service provider, route registration, exception renderer) and roll out endpoint-by-endpoint. Do not attempt to migrate existing endpoints wholesale.

Compatibility. The 2018 release predates PHP 8 and modern Laravel. Expect deprecation warnings, possible each()/create_function-era idioms, and PSR-4/PSR-15 assumptions that may not match current PSR versions. Composer dependency conflicts with current versions of psr/http-message or symfony/http-foundation are plausible and would need resolution in the fork. Verify the sibling enm/json-api-common is also forkable/maintainable, since it is a hard prerequisite.

Sequencing. (1) Feasibility spike: fork, pin PHP/Laravel versions, run test suite, document breakages. (2) Build adapter + single-resource vertical slice (read-only). (3) Add write operations and relationship endpoints. (4) Add exception handling and error-object rendering. (5) Expand resource coverage. Gate the whole effort behind step 1 — if the fork cost exceeds a few engineer-weeks, pivot to a maintained alternative.

Operational Impact

Maintenance. Highest-cost dimension. An archived dependency means we own the codebase. That requires a named maintainer, a forked repo under our org, a documented patch policy, and a periodic review against the JSON:API spec. Budget for at least one engineer to own it, with ongoing time for PHP/Laravel upgrade compatibility. This is the deciding factor: the package shifts maintenance from a vendor to us.

Support. No upstream support. Community help is essentially nonexistent (12 stars, 0 dependents). Documentation exists (readme, docs, changelog, releases) and is reasonably structured — the json-api-common docs are the real prerequisite — but is static and dated. Internal knowledge retention is a risk: if the original implementer leaves, the fork's implicit knowledge leaves with them.

Scaling. Transport-layer scaling is not the concern; JSON:API itself is heavier on the wire (compound documents, included arrays) and can produce N+1 or eager-loading challenges that we must solve in the resource layer. The library provides no caching, pagination strategy, or query optimization — those are ours. For high-traffic APIs, plan for response caching and careful relationship loading.

Failure modes. (1) Composer resolution failure against modern Laravel/PHP — blocks adoption at install time. (2) Runtime deprecation/fatal on PHP 8 in rarely exercised code paths — surfaces late. (3) Spec drift: JSON:API evolves; the archived library will not follow. (4) Bus factor of one maintainer on the fork. (5) Silent serialization bugs in edge cases (sparse fieldsets, relationship links) due to thin test coverage relative to a maintained package. Mitigation: comprehensive contract tests against the spec before trusting it in production.

Ramp-up. Steep relative to the package's size. Developers must learn (a) the JSON:API spec, (b) the json-api-common object model, (c) this library's abstract extension model, and (d) the fork we now maintain. Expect 1–2 weeks to first working endpoint and several sprints to fluency. Compare against a maintained Laravel-native alternative, where ramp-up is measured in days. Recommendation: do not adopt unless JSON:API compliance is a hard product requirement AND we are prepared to fork and own the code; otherwise prefer a maintained, Laravel-native JSON:API package.

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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator