Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Symfony Route Usage

Symfony Route Usage Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Detect used and unused Symfony routes

Frequently asked questions about Symfony Route Usage
Is symplify/symfony-route-usage a Laravel package?
No. It targets Symfony's symfony/routing component and the Symfony kernel event system, not Laravel's router. Laravel uses Illuminate\Routing\Router and RouteCollection, and it does not consume symfony/routing as its dispatcher. There is no service provider, adapter, or configuration surface aimed at Laravel in this codebase.
Can I install symplify/symfony-route-usage in a Laravel app with Composer?
You can technically run composer require, but it will be dead weight in a Laravel project. Package discovery finds no Laravel service provider, there is no bootable entry point, and no Laravel-facing API is exposed. You would also inherit its pinned PHP and Symfony version constraints, which may conflict with a modern Laravel composer.json.
What does symplify/symfony-route-usage actually do?
It records which routes actually fire during requests and console commands, then diffs that recorded set against the full Symfony RouteCollection. The result is a report of used versus unused route definitions. The mechanism is a kernel event subscriber listening on kernel.request and console events, followed by reporting and diff logic.
Is symplify/symfony-route-usage still maintained?
No, it lives under the deprecated-packages organization and upstream has explicitly retired it. That means no security patching and no forward-compatibility guarantees for newer PHP, Symfony, or Laravel major versions. It also has zero stars and zero dependents, so there is no community field testing or bug reporting behind it.
How do I detect unused routes in Laravel without this package?
Enumerate Route::getRoutes() at boot and persist route name, URI, methods, action, and middleware to a manifest table or JSON artifact. Then register a global terminate middleware or a Route::matched() listener that records route name, method, and timestamp into a buffered store. Diff the recorded set against the manifest to surface routes that never fire. This mirrors the Symfony package's design using native Laravel hooks.
How much engineering effort is a Laravel-native route usage tracker?
A clean implementation is realistically 2 to 4 engineer-days: roughly half a day for discovery, one day for instrumentation, and the rest for reporting and tests. By comparison, building an adapter around symplify/symfony-route-usage runs about 5 to 10 engineer-days plus permanent fork maintenance. The concept transfers, but the listener layer does not.
Does the route usage recording add overhead in production?
Per-request recording adds a write on every matched route, so the storage strategy matters more than the listener itself. Prefer a queued or aggregated write over a synchronous insert per request, or restrict collection to sampled traffic or a staging environment. If you already run APM, OpenTelemetry, or structured request logs, you may be able to answer the question at zero marginal cost.
Should route usage data come from all traffic or a sample?
Decide this before building, because it changes the design significantly. Full-fidelity per-request capture catches rarely hit endpoints such as webhooks and admin actions, while sampling over the last N days is far simpler and cheaper to store. If the goal is dead-endpoint pruning, a few weeks of sampled data is usually sufficient; access auditing demands complete coverage.
What Laravel versions and PHP versions does this package support?
It makes no Laravel version commitment at all, since it is not a Laravel package. As a retired Symfony-oriented library it also carries no guarantees for PHP 8.3 or 8.4 or for Symfony 7. Expect pinned dependency ranges from its vintage that may require version aliasing or ignore-platform-reqs hacks to resolve alongside a current Laravel install.
What are the alternatives to symplify/symfony-route-usage for Laravel projects?
The strongest option is a small in-house middleware plus a route manifest, which gives you full control and no fork liability. Laravel's own route:list output is a useful starting point for building the manifest, and observability tooling such as OpenTelemetry or APM request traces can answer usage questions without new code. Treat the Symfony package as a reference design for the diff-and-report step, not as an installable dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections