The Wayback Machine - https://web.archive.org/web/20220329162740/https://github.com/symfony/symfony/issues/45777
Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command debug:router --no-interaction fails when several route match #45777

Open
GromNaN opened this issue Mar 18, 2022 · 0 comments
Open

Command debug:router --no-interaction fails when several route match #45777

GromNaN opened this issue Mar 18, 2022 · 0 comments
Labels
Bug FrameworkBundle Good first issue Status: Needs Review
Milestone

Comments

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Mar 18, 2022

Symfony version(s) affected

4.4+

Description

There is a fatal error when command debug:router is used in non-interactive mode, with a name that matches more than 1 route.

How to reproduce

$ bin/console debug:router _profiler_ --no-interaction 

In RouteCollection.php line 130:
                                                                                                                                                                                                                                  
  Symfony\Component\Routing\RouteCollection::get(): Argument #1 ($name) must be of type string, null given, called in vendor/symfony/framework-bundle/Command/Router  
  DebugCommand.php on line 98                                                                                                                                                                                                     
                                                                                                                                                                                                                                  

debug:router [--show-controllers] [--format FORMAT] [--raw] [--] [<name>]

Possible Solution

2 ways to handle this path:

  1. Show the list of route that match with an error message (exit code != 0)
  2. Render the list, like if the name argument was not provided, but filtered.

Additional Context

No response

@GromNaN GromNaN added this to the 4.4 milestone Mar 18, 2022
@GromNaN GromNaN added the Good first issue label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug FrameworkBundle Good first issue Status: Needs Review
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants