gollumsf/rest-doc-bundle
gollumsf/rest-doc-bundle is a Symfony bundle that generates browsable REST API documentation from your controllers and annotations, helping teams discover endpoints and keep request/response references close to the code. It streamlines maintaining up-to-date API docs alongside your application.
order exactly as the API consumes it — comma-separated keys, each optionally suffixed :asc/:desc, and where #[ApiSortable] is declared, an explicit allow-list of keys with an example (title:desc). This is a direct upgrade to the self-serve quality of your public or partner API: consumers see valid sort keys and syntax in the spec instead of guessing.direction continues to work at the RestBundle layer but is no longer documented. That is a textbook "soft deprecate, document the forward path" decision — it lets you keep existing integrations alive while steering new consumers to order=field:direction. Treat this as a scheduled migration item on the API deprecation calendar rather than an emergency.gollumsf/rest-bundle: ^4.1. (2) CollectionHandler::__construct() now takes a MetadataSortManagerInterface; the service is autowired, so the default path is a no-op, but any team that decorates, replaces, or subclasses CollectionHandler must update. This is a "check your service overrides" upgrade, not a rewrite.#[ApiSortable] attribute on entity and action is the mechanism. Without any declared sortables, order degrades to a free string in the docs — so there is a concrete roadmap task: annotate your high-traffic collection endpoints to get the richer contract.Consider adopting (or keeping) it when:
gollumsf/rest-bundle and are at ^4.1 or can get there; the upgrade is small and autowiring absorbs the DI change.order strings — useful both for documentation and for constraining expensive/unindexed sorts.direction handled upstream on your behalf, with a documented migration path for consumers.Look elsewhere / defer when:
gollumsf/rest-bundle ^4.1 and cannot move this cycle; this release is then a blocker, not an improvement.CollectionHandler and no capacity to update the constructor wiring — small, but sequence it deliberately.direction being documented (e.g. generated SDKs keyed off that parameter). The parameter still functions, but the spec will stop advertising it; verify your SDK generation and contract tests before shipping.To executives: This is a low-risk maintenance release with one user-visible improvement: our generated API documentation now tells integrators exactly how to sort results, instead of describing a free-form parameter or an older direction convention. That reduces integration support load and spec drift. Cost is a routine dependency bump plus a short audit of any service overrides. No customer-facing behaviour is removed in this release; direction still works but is deprecated, so there is a defined migration window before we need to communicate anything to partners.
To engineering: Two action items. First, bump gollumsf/rest-bundle to ^4.1 — that is now a hard requirement. Second, grep for CollectionHandler replacements or extensions; the constructor now requires a MetadataSortManagerInterface, and autowiring covers the standard case only. Then adopt #[ApiSortable] on entity and action for our main collection endpoints so order is documented with a real allow-list and an example rather than as a free string. Migrate any docs/tests/SDK generation that assert on direction to order=field:direction. Confidence is high: 100% coverage across 360 tests on Symfony 6.4–8.1 and PHP 8.2/8.4, which also de-risks our Symfony 8 path.
How can I help you explore Laravel packages today?