friendsofsymfony/rest
FOSRestBundle provides tools for rapidly building RESTful APIs with Symfony, including format handling, view listeners, routing conventions, and request body decoding. It simplifies controller setup for JSON, XML, and other response formats while staying flexible and configurable.
Build vs. buy for API plumbing — decided once, not per service. This package exists to solve a recurring class of problems: content negotiation from Accept headers, request-body decoding, response serialization, and mapping exceptions to consistent HTTP status codes. Evaluating it forces an explicit decision on whether those concerns are (a) bought as a library, (b) supplied by the framework's native HTTP layer, or (c) built in-house as thin, owned middleware. For a Laravel product the answer is (b) plus a small amount of (c); the value of this evaluation is documenting that decision so it stops being re-litigated for every new service.
A "standards and error contracts" roadmap item. The most durable output of this package is conceptual, not code. Its four listener concerns — format negotiation, view/response shaping, body decoding, and normalized error handling — are a ready-made checklist for a written API contract standard: one error envelope, consistent status-code mapping, content-type rules, and versioning conventions. That standard is a legitimate, schedulable workstream independent of whether the package is ever installed.
API surface and deprecation policy. The package's conventions imply choices about URI versioning vs. content-type-driven versioning, and about how routes and formats are declared at the controller level. Those choices leak into client-facing contracts, so they anchor roadmap conversations about backward compatibility windows and deprecation commitments to partners and mobile clients.
Dependency governance and third-party risk posture. Discovering this in a dependency tree is a policy decision point: do we permit archived libraries, and if so under what conditions (frozen service, no untrusted input, owned fork, dated migration ticket)? That policy has budget implications and is worth setting centrally rather than case by case.
Platform-fit as a scoping correction. Despite being filed alongside Laravel/PHP packages, this is a Symfony package (FriendsOfSymfony), built on Symfony's HTTP foundation and event dispatcher. For Laravel services it is out of scope entirely. Logging this now prevents wasted spikes and keeps build-vs-buy comparisons honest.
Remediation and migration sizing. Zero dependents and a 2013 last release mean the realistic product use of this package is as an inventory item: if it appears anywhere in our estate, the PM decision is to size a migration, not to adopt or fork.
Bottom line: use it as reference material for defining an API contract standard and a dependency policy; do not put it in the product's dependency graph.
Consider it only in the narrow legacy case, where all of the following hold:
Look elsewhere in essentially every other case. Concretely, do not adopt when:
#[Route], MapRequestPayload, and #[Serialize].Adoption criteria summary: treat archival status, release recency, dependent count, and platform fit as hard gates. This package fails all four. The only passing path is legacy maintenance of an existing installation.
For executives. There is nothing to buy here. This library was a reasonable idea in 2013, but it is archived, has shipped no release in over a decade, and has no downstream users to validate it. Adopting it would mean owning an unmaintained PHP component ourselves, with no security-patch path — a liability carried for the life of the product — in exchange for functionality current frameworks already provide at zero marginal cost. Recommendation: do not adopt; no budget line. If it appears anywhere in our dependency inventory, log it as tech debt with a migration ticket and an owner.
For engineering. Two takeaways. First, a scope correction: this is a Symfony package, not a Laravel one, so for Laravel services it is simply out of scope — no spike required. Second, the requirements it documented are still ours to satisfy: consistent exception-to-HTTP-status mapping, content negotiation, request-body decoding, and versioning conventions. Capture those as a short written API standard and implement them with framework primitives plus owned middleware. Where we have Symfony surface, the maintained path is FOSRestBundle or API Platform — never this repository. Treat the repo as design vocabulary (format listener, view listener, body listener, param fetcher), not as a dependency.
The ask.
How can I help you explore Laravel packages today?