Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1de0f19

Browse files
committed
[FrameworkBundle][Command] Fix debug:router --no-interaction error when several route match
When command `debug:router` is used in non-interactive mode with a name that matches more than one route, render the list of matching routes
1 parent c86733b commit 1de0f19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8484
$route = $routes->get($name);
8585
$matchingRoutes = $this->findRouteNameContaining($name, $routes);
8686

87-
if (!$input->isInteractive() && !$route && count($matchingRoutes) > 1) {
87+
if (!$input->isInteractive() && !$route && \count($matchingRoutes) > 1) {
8888
$foundRoutes = $this->findRouteContaining($name, $routes);
8989
$helper->describe($io, $foundRoutes, [
9090
'format' => $input->getOption('format'),

0 commit comments

Comments
 (0)