somnambulist/fractal-bundle
A Laravel bundle that integrates League Fractal, adding service providers, configuration and helpers so you can transform API responses with Fractal serializers, includes and pagination using familiar framework conventions.
toArray() methods per controller.samj/fractal-bundle. Its clearest product value is as a migration path: if you already depend on Fractal via the original bundle, this is the drop-in that lets you move to current Symfony/PHP versions instead of rewriting your entire serialization layer under deadline.league/fractal. The decision this informs is "do we take a dependency on a near-zero-adoption wrapper, or wire Fractal ourselves in ~100 lines of service configuration?" — a maintenance-burden tradeoff, not a feature tradeoff.spatie/laravel-fractal. Surfacing that mismatch early prevents wasted evaluation cycles and a wrong item on the tech-radar.Adopt (or at least pilot) when:
league/fractal as the presentation layer.samj/fractal-bundle and want the smallest possible diff — the port exists specifically to keep existing transformer registrations working.Look elsewhere when:
spatie/laravel-fractal if you specifically want Fractal semantics. This package does not apply.Diligence before committing: check last commit date and open-issue count on the repo, run the test suite against your target Symfony/PHP versions, and decide in advance who owns the fork if upstream goes quiet.
For executives: This is a small, permissively licensed (MIT) integration package that standardizes how our Symfony APIs shape their JSON output, and — more importantly — it gives us a low-risk exit from an abandoned dependency we'd otherwise be stuck on. It is not a strategic platform bet: it has negligible community adoption and no vendor support, so we should treat it as glue we may need to own. Recommendation: adopt only where it unblocks an upgrade or preserves an existing Fractal investment; for any new API build, evaluate API Platform instead, since it delivers documentation and schema generation we'd otherwise build ourselves.
For engineering: The bundle is thin — DI configuration plus transformer resolution around league/fractal. Two consequences: the real dependency is Fractal itself, and if the wrapper goes stale we can inline it in roughly a day. Fractal gives us a clean presentation layer with includes, sparse fieldsets, and pluggable serializers (array, JSON-API, HAL), which decouples API contracts from domain models and makes versioning tractable. Caveats to accept explicitly: near-zero downstream usage, no maintainer guarantees, and no OpenAPI generation — verify Symfony/PHP compatibility in CI rather than trusting the metadata. And confirm scope: this is a Symfony bundle; if the service in question is Laravel, this is the wrong tool and we should stop the evaluation here.
How can I help you explore Laravel packages today?