Description
Description
It might be useful to add a new InputOption
named "method" to the debug:router
command. This option would allow developers to filter the displayed routes by HTTP method (GET, POST, PUT, DELETE, etc.) when running the command. This would make debugging routes a bit easier and more efficient, especially when working with large applications. Additionally, it would bring the debug:router
command in line with the router:match
command, which already has a similar option for filtering by method.
If this feature aligns with the goals of Symfony, I would be happy to open a PR for the 7.3 branch.
Example
Before adding the new InputOption:
php bin/console debug:router
After adding the new InputOption:
php bin/console debug:router --method=GET
Before adding the new InputOption with the name argument
php bin/console debug:router app_foo
After adding the method InputOption with the name argument:
php bin/console debug:router app_foo --method=DELETE