halloverden/symfony-route-deprecation-bundle
A Symfony bundle for deprecating routes: mark routes as deprecated so requests trigger configurable deprecation notices, helping you track usage and migrate consumers safely before removal.
Architecture fit. The first-order finding is a stack mismatch: this is a Symfony bundle, not a Laravel package. It relies on Symfony's bundle registration and kernel event system, neither of which has a Laravel equivalent. Laravel's router does wrap symfony/routing primitives, but the wiring layer — the part the bundle actually ships — is not portable. What transfers is the behavioral contract: read route-level metadata, attach Deprecation, Sunset, and Link headers to the response.
Treat this package as a reference implementation of a spec, not a dependency. The score signals support that: 9 stars, zero dependents, opportunity 2.82 — novel problem space, near-zero adoption. It is directionally interesting and operationally unproven.
Integration feasibility. The underlying logic is thin — likely a request/response listener of 100–200 LOC. Reimplementing it as Laravel middleware plus a route macro is a matter of days, not weeks. Attempting to install the bundle directly into a Laravel app would drag symfony/framework-bundle into a dependency graph that already pins Symfony components at Laravel-compatible versions — a version-conflict surface with no offsetting benefit.
Technical risk.
Deprecation: @1688169599), but earlier drafts used Deprecation: true and intermediate drafts used other shapes. Emitting a stale format is worse than emitting nothing: you believe you have notified clients, and conformant parsers silently ignore you.Key questions.
Sunset (RFC 8594) and Link: rel="deprecation" alongside Deprecation, or only the primary header?Stack fit. Laravel 10/11/12. Implement as HTTP middleware registered in the api group, with route metadata supplied via Route::get(...)->defaults('deprecated_at', ...) or a thin custom macro. If API docs are generated (Scramble, Scribe, hand-written OpenAPI), the same deprecation flag must drive deprecated: true in the schema — two sources of truth will diverge within one release cycle.
Build vs. buy. Build. Estimated 3–5 engineering days for middleware, route macro, config file, conformance tests, and consumer-facing documentation. Forking the bundle's listener logic is acceptable if MIT attribution is retained, but the adaptation work approaches the cost of a clean implementation.
Compatibility. Target RFC 9745 (Deprecation), RFC 8594 (Sunset, HTTP-date format), and RFC 8288 (Link). No Vary is required — the header is a function of the route, not the request. Ordering matters: the middleware must run such that headers survive response caching and are present on cached variants.
Sequencing.
Maintenance. You own the code. Budget 1–2 days per quarter for framework and spec drift; expect low churn once RFC-aligned. The fork-or-build decision is really an ownership decision — either way, no one else is maintaining this for you.
Support. No vendor, no SLA, no disclosure policy. Internal ownership and a documented header contract for external consumers are prerequisites, not nice-to-haves. External API consumers will file tickets against your deprecation notices; the policy document is your first-line support asset.
Scaling. Effectively free. Two or three additional response headers per request, no I/O, no allocation of note. The only ceiling is aggregate header size at a gateway (commonly 8KB); a Link header carrying a long documentation URL is the item to watch.
Failure modes.
Ramp-up. Roughly half a day for a Laravel engineer to ship the middleware; roughly one additional day to internalize the structured-field semantics. The concentration risk is low, but the syntax details — the @ epoch prefix, HTTP-date formatting for Sunset — are trivially easy to get wrong and should be pinned by a conformance test rather than review.
How can I help you explore Laravel packages today?