-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Add new InputOption 'method' to debug:router command #59906
New issue
8000 Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
nicolas-grekas
added a commit
that referenced
this issue
Mar 13, 2025
…er` command (santysisi) This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] Add `--method` option to `debug:router` command | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Feature #59906 | License | MIT ### Description I have added a new `InputOption` named `method` to the `debug:router` command. This option allows developers to filter the displayed routes by HTTP method (GET, POST, PUT, DELETE, etc.) when running the command. This improvement makes it easier and more efficient to debug routes, especially in large applications. It also aligns the `debug:router` command with the `router:match` command, which already includes a similar option for filtering by HTTP method. ### Changes Made * Added the --method option to the debug:router command. * Routes can now be filtered based on the HTTP method used (GET, POST, PUT, DELETE, etc.). * This enhances debugging capabilities and streamlines the process of working with specific route methods. ### 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  Commits ------- 6a98d49 Add 'method' option to debug:router command to filter routes by HTTP method
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this issue
Mar 18, 2025
…n for filtering routes (santysisi) This PR was merged into the 7.3 branch. Discussion ---------- [Routing] Add new tip to explain usage of --method option for filtering routes This PR updates the documentation for the debug:router command to include the new --method option, which allows developers to filter routes by HTTP method (such as GET, POST, PUT, DELETE, etc.). This enhances the debug:router command, making it easier to focus on specific routes based on their HTTP method, especially in large applications. For more context, refer to the original issue: [Symfony Issue #59906](symfony/symfony#59906). Commits ------- b04bc3a Add new tip to explain usage of --method option for filtering routes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
It might be useful to add a new
InputOption
named "method" to thedebug: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 thedebug:router
command in line with therouter: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
The text was updated successfully, but these errors were encountered: