Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@GromNaN

Description

@GromNaN
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.