Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] Add--method
option todebug:router
command#59909
New issue
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[FrameworkBundle] Add--method
option todebug:router
command#59909
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedMar 4, 2025
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
--method
option todebug:router
commandUh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
2c1095c
toe2d90fa
Comparesrc/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
e2d90fa
toca61a87
CompareHi 😃, I hope you're doing well! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Almost good to me 😉
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ca61a87
to3d9c69d
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Congrats on your great first PR to Symfony.
Thank you very much, I'm very excited 😄 |
if ( | ||
$route->getMethods() | ||
&& !\in_array($method, $route->getMethods(), true) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Symfony usually prefers one liners to ease merging
if ( | ||
false !== stripos($routeName, $name) | ||
&& (null === $method || !$route->getMethods() || \in_array($method, $route->getMethods(), true)) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Symfony usually prefers one liners to ease merging
3d9c69d
to6a98d49
CompareThank you@santysisi. |
6c0058a
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Description
I have added a new
InputOption
namedmethod
to thedebug: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 thedebug:router
command with therouter:match
command, which already includes a similar option for filtering by HTTP method.Changes Made
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