From f663aa012df11824a5458165cbad502933507c9c Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Thu, 23 Apr 2020 00:18:32 +0200 Subject: [PATCH 1/6] Added debug:router --sort option --- .../Command/RouterDebugCommand.php | 31 ++++ .../Tests/Command/RouterDebugCommandTest.php | 171 ++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 16acf7a7db9c4..e0d7f68a2edba 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -20,6 +20,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouterInterface; @@ -58,6 +59,7 @@ protected function configure() new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), + new InputOption('sort', null, InputOption::VALUE_REQUIRED, 'The sorting field (priority, name, or path)', 'priority'), ]) ->setDescription('Displays current routes for an application') ->setHelp(<<<'EOF' @@ -82,6 +84,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int $helper = new DescriptorHelper($this->fileLinkFormatter); $routes = $this->router->getRouteCollection(); $container = $this->fileLinkFormatter ? \Closure::fromCallable([$this, 'getContainerBuilder']) : null; + $sortOption = $input->getOption('sort'); + + if (null !== $sortOption) { + $routes = $this->sortRoutes($routes, $sortOption); + } if ($name) { if (!($route = $routes->get($name)) && $matchingRoutes = $this->findRouteNameContaining($name, $routes)) { @@ -125,4 +132,28 @@ private function findRouteNameContaining(string $name, RouteCollection $routes): return $foundRoutesNames; } + + private function sortRoutes(RouteCollection $routes, string $propertyName): RouteCollection + { + $validOptions = ['', 'priority', 'name', 'path']; + $sortedRoutes = $routes->all(); + if ('name' === $propertyName) { + ksort($sortedRoutes); + } elseif ('path' === $propertyName) { + uasort( + $sortedRoutes, + static function (Route $a, Route $b): int { + return $a->getPath() <=> $b->getPath(); + } + ); + } elseif (!\in_array($propertyName, $validOptions)) { + throw new InvalidArgumentException(sprintf('The option "%s" is not valid.', $propertyName)); + } + $routeCollection = new RouteCollection(); + foreach ($sortedRoutes as $routeName => $route) { + $routeCollection->add($routeName, $route); + } + + return $routeCollection; + } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php new file mode 100644 index 0000000000000..669c923002587 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php @@ -0,0 +1,171 @@ +createCommandTester(); + $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m', $tester->getDisplay(true)); + } + + public function testSortingByName() + { + $tester = $this->createCommandTester(); + $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta)/m', $tester->getDisplay(true)); + } + + public function testSortingByPath() + { + $tester = $this->createCommandTester(); + $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform)/m', $tester->getDisplay(true)); + } + + public function testThrowsExceptionWithInvalidParameter() + { + $tester = $this->createCommandTester(); + $this->expectExceptionMessage('The option "foobar" is not valid'); + $tester->execute(['--sort' => 'foobar'], ['decorated' => false]); + } + + public function testThrowsExceptionWithNullParameter() + { + $tester = $this->createCommandTester(); + $this->expectExceptionMessage('The "--sort" option requires a value.'); + $tester->execute(['--sort' => null], ['decorated' => false]); + } + + public function testSortingByPriorityWithDuplicatePath() + { + $tester = $this->createCommandTesterWithDuplicatePath(); + $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo).*\n\W*(echo)/m', $tester->getDisplay(true)); + } + + public function testSortingByNameWithDuplicatePath() + { + $tester = $this->createCommandTesterWithDuplicatePath(); + $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta).*\n\W*(echo)/m', $tester->getDisplay(true)); + } + + public function testSortingByPathWithDuplicatePath() + { + $tester = $this->createCommandTesterWithDuplicatePath(); + $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); + $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform).*\n.*(\/uniform)/m', $tester->getDisplay(true)); + } + + private function createCommandTester(): CommandTester + { + $application = new Application($this->getKernel()); + $application->add(new RouterDebugCommand($this->getRouter())); + + return new CommandTester($application->find('debug:router')); + } + + private function createCommandTesterWithDuplicatePath(): CommandTester + { + $application = new Application($this->getKernel()); + $application->add(new RouterDebugCommand($this->getRouterWithDuplicatePath())); + + return new CommandTester($application->find('debug:router')); + } + + private function getRouter() + { + $routeCollection = new RouteCollection(); + $routeCollection->add('charlie', new Route('uniform')); + $routeCollection->add('alfa', new Route('sierra')); + $routeCollection->add('delta', new Route('tango')); + $routeCollection->add('bravo', new Route('romeo')); + $requestContext = new RequestContext(); + $router = $this->createMock(RouterInterface::class); + $router + ->expects($this->any()) + ->method('getRouteCollection') + ->willReturn($routeCollection); + $router + ->expects($this->any()) + ->method('getContext') + ->willReturn($requestContext); + + return $router; + } + + private function getRouterWithDuplicatePath() + { + $routeCollection = new RouteCollection(); + $routeCollection->add('charlie', (new Route('uniform'))->setMethods('GET')); + $routeCollection->add('alfa', new Route('sierra')); + $routeCollection->add('delta', new Route('tango')); + $routeCollection->add('bravo', new Route('romeo')); + $routeCollection->add('echo', (new Route('uniform'))->setMethods('POST')); + + $requestContext = new RequestContext(); + $router = $this->createMock(RouterInterface::class); + $router + ->expects($this->any()) + ->method('getRouteCollection') + ->willReturn($routeCollection); + $router + ->expects($this->any()) + ->method('getContext') + ->willReturn($requestContext); + + return $router; + } + + private function getKernel() + { + $container = $this->createMock(ContainerInterface::class); + $container + ->expects($this->atLeastOnce()) + ->method('has') + ->willReturnCallback(function ($id) { + return 'console.command_loader' !== $id; + }) + ; + $container + ->expects($this->any()) + ->method('get') + ->with('router') + ->willReturn($this->getRouter()) + ; + + $kernel = $this->createMock(KernelInterface::class); + $kernel + ->expects($this->any()) + ->method('getContainer') + ->willReturn($container) + ; + $kernel + ->expects($this->once()) + ->method('getBundles') + ->willReturn([]) + ; + + return $kernel; + } +} From afba921d454fdc8a94c05dee533c012b63ecfdc0 Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Thu, 23 Apr 2020 08:22:30 +0200 Subject: [PATCH 2/6] Updated CHANGELOG.md --- src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 98966a5a18bb2..7223e42d28f4c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG * Made `BrowserKitAssertionsTrait` report the original error message in case of a failure * Added ability for `config:dump-reference` and `debug:config` to dump and debug kernel container extension configuration. * Deprecated `session.attribute_bag` service and `session.flash_bag` service. + * Added `debug:router --sort` option to see routes sorted by name or path as well as by priority 5.0.0 ----- From ced94dad0dd97efdcc40eeabffcf9458927e7133 Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Sun, 26 Apr 2020 23:06:49 +0200 Subject: [PATCH 3/6] PR 36579 corrections via @nicolas-grekas --- .../Command/RouterDebugCommand.php | 16 +++------------ .../Tests/Command/RouterDebugCommandTest.php | 20 +++++++++++++------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index e0d7f68a2edba..8dbb62d51a610 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -82,13 +82,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $io = new SymfonyStyle($input, $output); $name = $input->getArgument('name'); $helper = new DescriptorHelper($this->fileLinkFormatter); - $routes = $this->router->getRouteCollection(); $container = $this->fileLinkFormatter ? \Closure::fromCallable([$this, 'getContainerBuilder']) : null; $sortOption = $input->getOption('sort'); - - if (null !== $sortOption) { - $routes = $this->sortRoutes($routes, $sortOption); - } + $routes = $this->sortRoutes($this->router->getRouteCollection(), $sortOption); if ($name) { if (!($route = $routes->get($name)) && $matchingRoutes = $this->findRouteNameContaining($name, $routes)) { @@ -135,18 +131,12 @@ private function findRouteNameContaining(string $name, RouteCollection $routes): private function sortRoutes(RouteCollection $routes, string $propertyName): RouteCollection { - $validOptions = ['', 'priority', 'name', 'path']; $sortedRoutes = $routes->all(); if ('name' === $propertyName) { ksort($sortedRoutes); } elseif ('path' === $propertyName) { - uasort( - $sortedRoutes, - static function (Route $a, Route $b): int { - return $a->getPath() <=> $b->getPath(); - } - ); - } elseif (!\in_array($propertyName, $validOptions)) { + uasort($sortedRoutes, function ($a, $b) { return $a->getPath() <=> $b->getPath(); }); + } elseif ('priority' !== $propertyName) { throw new InvalidArgumentException(sprintf('The option "%s" is not valid.', $propertyName)); } $routeCollection = new RouteCollection(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php index 669c923002587..a4c96cbd5af61 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php @@ -19,7 +19,7 @@ public function testSortingByPriority() { $tester = $this->createCommandTester(); $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m', $tester->getDisplay(true)); } @@ -27,7 +27,7 @@ public function testSortingByName() { $tester = $this->createCommandTester(); $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta)/m', $tester->getDisplay(true)); } @@ -35,7 +35,7 @@ public function testSortingByPath() { $tester = $this->createCommandTester(); $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform)/m', $tester->getDisplay(true)); } @@ -57,7 +57,7 @@ public function testSortingByPriorityWithDuplicatePath() { $tester = $this->createCommandTesterWithDuplicatePath(); $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo).*\n\W*(echo)/m', $tester->getDisplay(true)); } @@ -65,7 +65,7 @@ public function testSortingByNameWithDuplicatePath() { $tester = $this->createCommandTesterWithDuplicatePath(); $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta).*\n\W*(echo)/m', $tester->getDisplay(true)); } @@ -73,10 +73,18 @@ public function testSortingByPathWithDuplicatePath() { $tester = $this->createCommandTesterWithDuplicatePath(); $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); - $this->assertEquals(0, $result, 'Returns 0 in case of success'); + $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform).*\n.*(\/uniform)/m', $tester->getDisplay(true)); } + public function testWithoutCallingSortOptionExplicitly() + { + $tester = $this->createCommandTester(); + $result = $tester->execute([], ['decorated' => false]); + $this->assertSame(0, $result, 'Returns 0 in case of success'); + $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m', $tester->getDisplay(true)); + } + private function createCommandTester(): CommandTester { $application = new Application($this->getKernel()); From 49029ae2dc53dff1a74c8da425737f89184abe12 Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Sat, 11 Jul 2020 08:49:14 +0200 Subject: [PATCH 4/6] Added caution alert when sorting criterion != priority --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 3 +++ .../Tests/Command/RouterDebugCommandTest.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 8dbb62d51a610..41742962310e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -85,6 +85,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $container = $this->fileLinkFormatter ? \Closure::fromCallable([$this, 'getContainerBuilder']) : null; $sortOption = $input->getOption('sort'); $routes = $this->sortRoutes($this->router->getRouteCollection(), $sortOption); + if ('priority' !== $sortOption) { + $io->caution('The routes list is not sorted in the parsing order.'); + } if ($name) { if (!($route = $routes->get($name)) && $matchingRoutes = $this->findRouteNameContaining($name, $routes)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php index a4c96cbd5af61..02159882d7460 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php @@ -21,6 +21,7 @@ public function testSortingByPriority() $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m', $tester->getDisplay(true)); + $this->assertStringNotContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testSortingByName() @@ -29,6 +30,7 @@ public function testSortingByName() $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta)/m', $tester->getDisplay(true)); + $this->assertStringContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testSortingByPath() @@ -37,6 +39,7 @@ public function testSortingByPath() $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform)/m', $tester->getDisplay(true)); + $this->assertStringContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testThrowsExceptionWithInvalidParameter() @@ -59,6 +62,7 @@ public function testSortingByPriorityWithDuplicatePath() $result = $tester->execute(['--sort' => 'priority'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo).*\n\W*(echo)/m', $tester->getDisplay(true)); + $this->assertStringNotContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testSortingByNameWithDuplicatePath() @@ -67,6 +71,7 @@ public function testSortingByNameWithDuplicatePath() $result = $tester->execute(['--sort' => 'name'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta).*\n\W*(echo)/m', $tester->getDisplay(true)); + $this->assertStringContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testSortingByPathWithDuplicatePath() @@ -75,6 +80,7 @@ public function testSortingByPathWithDuplicatePath() $result = $tester->execute(['--sort' => 'path'], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform).*\n.*(\/uniform)/m', $tester->getDisplay(true)); + $this->assertStringContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } public function testWithoutCallingSortOptionExplicitly() @@ -83,6 +89,7 @@ public function testWithoutCallingSortOptionExplicitly() $result = $tester->execute([], ['decorated' => false]); $this->assertSame(0, $result, 'Returns 0 in case of success'); $this->assertRegExp('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m', $tester->getDisplay(true)); + $this->assertStringNotContainsString('! [CAUTION] The routes list is not sorted in the parsing order.', $tester->getDisplay(true)); } private function createCommandTester(): CommandTester From 6f743c1be39f1b4d9f80d9d7169335f31d76374c Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Thu, 20 Aug 2020 09:25:24 +0200 Subject: [PATCH 5/6] Update src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php c/o @Tobion Co-authored-by: Tobias Schultze --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 41742962310e5..6272eeede993b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -59,7 +59,7 @@ protected function configure() new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), - new InputOption('sort', null, InputOption::VALUE_REQUIRED, 'The sorting field (priority, name, or path)', 'priority'), + new InputOption('sort', null, InputOption::VALUE_REQUIRED, 'The sorting criterion (priority, name, or path)', 'priority'), ]) ->setDescription('Displays current routes for an application') ->setHelp(<<<'EOF' From 4a034acb83e558f0ec2de3d5e8bf0ce69d5c12c6 Mon Sep 17 00:00:00 2001 From: Andrea Bergamasco Date: Thu, 20 Aug 2020 09:27:10 +0200 Subject: [PATCH 6/6] Update src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php c/o @Tobion Co-authored-by: Tobias Schultze --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 6272eeede993b..b1fc862d0d2e3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $sortOption = $input->getOption('sort'); $routes = $this->sortRoutes($this->router->getRouteCollection(), $sortOption); if ('priority' !== $sortOption) { - $io->caution('The routes list is not sorted in the parsing order.'); + $io->caution(sprintf('The routes are not sorted in the order they get matched but by %s.', $sortOption)); } if ($name) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy