fsc/hateoas-bundle
Symfony bundle that adds HATEOAS hypermedia links to your API responses. Define relations and links with annotations, integrate with JMS Serializer and Symfony routing, and expose discoverable HAL/JSON-LD resources so clients can navigate your API at runtime.
_links/relations, so the decision "do we expose HATEOAS affordances to clients?" becomes a cheap experiment instead of a multi-sprint architecture project. You can pilot on one resource and measure client impact.rel names, embed sub-resources, keep it consistent across endpoints. This package replaces that with annotation/config-driven declaration. The "buy" side is genuinely cheaper here — the build cost is low but the drift cost (inconsistent rel naming across teams) is what actually hurts.v1 → v2 migration or can evolve in place. This is the strongest strategic argument for the package and the one worth putting on a roadmap slide.Adopt (or spike) when:
symfony/serializer, the integration savings shrink substantially.rel naming across teams that currently invent it ad hoc — the annotation model gives you a reviewable, greppable contract.Look elsewhere when:
spatie/laravel-fractal-style transformers for the same problem; this bundle is the wrong tool.To executives: This is a low-cost way to make our API self-describing, which means clients adjust to changes by following links instead of us coordinating releases with every consumer. That buys us fewer breaking-change migrations and lower partner-integration support cost. The package itself is small and unmaintained-by-community, so the honest framing is: we're buying a proven head start and taking ownership of the code — a one-time engineering investment plus a small ongoing maintenance line, not a vendor dependency. Recommendation is a two-week spike on a single endpoint before any broader commitment.
To engineering: Annotation-driven, Symfony-native, composes with JMS Serializer and FOSRestBundle; removes per-controller link boilerplate and puts rel naming under code review. Caveats to state plainly: it is not actively maintained at scale, it is Symfony-only, and we should fork it, pin it, and assign an owner. The spike deliverable is a single resource with links + one embedded relation, plus a written assessment of what a fork would cost us per Symfony major. If the spike shows more yak-shaving than boilerplate savings, we stop — the exit cost is near zero at that scope.
How can I help you explore Laravel packages today?