Closed
Description
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:
- Show the list of route that match with an error message (exit code != 0)
- Render the list, like if the
name
argument was not provided, but filtered.
Additional Context
No response