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

Symfony Jsonapi Bundle Laravel Package

alexfigures/symfony-jsonapi-bundle

Production-ready JSON:API 1.1 bundle for Symfony featuring full filtering, sorting, pagination, automatic eager loading, and zero N+1 queries. 97.8% spec conformance, PHPStan level 8, PHP 8.3+ and Symfony 7.1+, with optional Doctrine ORM 3 integration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Adoption of JSON:API Standard: Enables consistent API design across services and clients, reducing client-side complexity and improving developer experience.
  • Roadmap for API Modernization: Accelerates migration from REST to JSON:API for new or legacy Symfony 7 projects with minimal refactoring overhead.
  • Build vs. Buy Decision: v1.0.0 strengthens the buy case: the bundle is now stable, covers 98.5% of the JSON:API spec, and avoids custom compliance work while leveraging Symfony’s ecosystem.
  • Production Readiness / Dependency Approval: The stable 1.0 release signals public-API stability expectations and lowers adoption risk for production planning versus pre-1.0 dependencies.
  • Use Cases:
    • Headless CMS/APIs: Structured content delivery with sparse fieldsets and efficient pagination.
    • Multi-Tenant SaaS: Role-based field filtering and relationship inclusion for granular data access.
    • Mobile/Web Apps: Optimized payloads via fields and include parameters to reduce bandwidth.
    • GraphQL Migration Path: JSON:API’s declarative nature simplifies future GraphQL adoption through shared resolvers and types.

When to Consider This Package

Adopt if:

  • Your Symfony 7.1+ project requires JSON:API 1.1 compliance or is replacing ad hoc REST endpoints.
  • You need production-ready validation with high MUST/SHOULD spec coverage and minimal custom code.
  • You want a stable 1.0 dependency with clearer upgrade expectations for production systems.
  • Your team prioritizes developer experience: DX-first design, comprehensive docs, and strong test coverage.
  • You’re building scalable APIs with sparse fieldsets, pagination, or complex relationships such as nested include.
  • You want to avoid reinventing JSON:API while keeping Symfony’s flexibility through Doctrine, events, and hooks.

Look elsewhere if:

  • You’re not using Symfony 7.1+; compatibility is limited to modern Symfony.
  • You need a Laravel-native package or non-Symfony integration and are unwilling to absorb adapter/framework-fit costs.
  • Your API requires cursor-based pagination as a first-class feature; evaluate knp/paginator or api-platform.
  • You need real-time updates via WebSockets/subscriptions; consider Mercure or API Platform.
  • Your use case demands GraphQL; use API Platform or graphql-php.
  • You require highly custom error formats beyond JSON:API’s standardized errors.

How to Pitch It (Stakeholders)

For Executives: *"This package lets us launch a JSON:API-compliant backend in weeks, not months. With the stable 1.0 release, we get a production-ready Symfony bundle where 98.5% of the JSON:API spec is handled out of the box, so the team can focus on business logic instead of protocol plumbing. It helps us:

  • Reduce mobile app payloads with sparse fieldsets such as fields[articles]=title,createdAt.
  • Unify APIs across teams with a standardized format and fewer REST-vs-GraphQL debates.
  • Cut API development time compared with building JSON:API compliance from scratch.
  • Lower dependency risk because v1.0.0 signals API stability and a production adoption milestone. It is MIT-licensed, well-tested, and integrates with Symfony’s ecosystem the way we already use Doctrine or Twig."*

For Engineers: *"This is the Swiss Army knife for JSON:API in Symfony 7, now at a stable 1.0 release. Key perks:

  • Zero reinvention: high spec coverage, with remaining gaps limited to optional areas.
  • Stable dependency: v1.0.0 reduces pre-1.0 API churn risk and supports production upgrade planning.
  • DX-first: clean API, strong docs, and a test suite that proves behavior.
  • Symfony-native: works with Doctrine, Twig, events, and hooks without framework lock-in.
  • Performance-minded: optimized for sparse fieldsets, pagination, and relationship inclusion.
  • Future-proof: deferred features such as cursor pagination remain roadmap candidates.

Example: exposing a Post resource with relationships:

// src/Controller/PostController.php
use AlexFigures\Symfony\JsonApi\Action\CollectionAction;
use AlexFigures\Symfony\JsonApi\Action\ResourceAction;

class PostController extends AbstractJsonApiController
{
    #[CollectionAction] public function collection(): JsonApiCollection { ... }
    #[ResourceAction]    public function resource(Post $post): JsonApiResource { ... }
}

No annotations, no boilerplate—just JSON:API. Start with make install and make test to verify compliance."*

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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager