symplify/symfony-route-usage
Symplify Symfony Route Usage helps identify unused routes in Symfony applications by scanning code and templates for route references. Use it to audit routing configs, remove dead endpoints, and keep route definitions clean and maintainable.
deprecated-packages, this is not an adoptable dependency. It is a reference implementation of a thin pattern (a kernel.request listener that records the matched _route, plus a report command). Treat it as a design sketch to reimplement in-house in a day or two, dev-only, with an expiry date — not as a vendor choice.Consider the approach (not the package as a dependency) when:
$request->route()->getName() plus php artisan route:list as the inventory. Forcing this package into a Laravel codebase is a non-starter.Look elsewhere (or build) when:
deprecated-packages, zero stars, zero dependents. No security response, no compatibility guarantee for current Symfony versions, no issue triage. Any use must be pinned, dev-only, and short-lived — or vendored and owned.path()/url() call sites, plus a PHPStan or Rector rule for orphaned route names, catches a meaningful share without touching runtime at all.Adoption gate to write down before anyone starts: Symfony-only, dev/staging plus a sampled canary in production, observation window covering at least one full business cycle, and a named owner for the in-house fork.
For executives (one paragraph): We can shrink the surface area we maintain — fewer live endpoints to secure, monitor, test, and carry through framework upgrades. The output is a ranked list of routes worth retiring, backed by traffic evidence. Cost is small: the open-source package itself is archived and unmaintained, so we would not take a dependency on it — we'd reimplement the same ~200-line pattern in-house in about a day. Benefit is reduced maintenance and security-review burden, not new revenue; judge it as a cost-reduction and risk-reduction play.
For engineering (the actual ask): Do not add symplify/symfony-route-usage as a dependency — it's deprecated, has no users, and won't track current Symfony releases. Take the pattern: a lightweight kernel.request listener that records route name and timestamp for a bounded window, a console command that diffs observed routes against debug:router output, and a hard feature flag plus expiry so it never becomes permanent production scaffolding. Run it in staging continuously and in production behind sampling.
Say the caveat out loud in the room: "Unused" from a short observation window is a hypothesis, not a fact. We commit to a full business cycle of evidence, cross-checked against logs or APM, and a redirect/deprecation period before any route is removed.
How can I help you explore Laravel packages today?