From b1a9587ea781c4a378542adea005633a01f31816 Mon Sep 17 00:00:00 2001 From: Shin Date: Fri, 24 Aug 2012 23:33:39 +0900 Subject: [PATCH 1/2] fixed bug related to the change PR #5326 --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index c1ed499c3f..e469ac21d7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -77,10 +77,7 @@ EOF protected function outputRoutes(OutputInterface $output, $routes = null) { if (null === $routes) { - $routes = array(); - foreach ($this->getContainer()->get('router')->getRouteCollection()->all() as $name => $route) { - $routes[$name] = $route->compile(); - } + $routes = $this->getContainer()->get('router')->getRouteCollection()->all(); } $output->writeln($this->getHelper('formatter')->formatSection('router', 'Current routes')); From 472dfdc46afced0d5cc4804a1a00da1874ed7e32 Mon Sep 17 00:00:00 2001 From: Shin Date: Fri, 24 Aug 2012 23:41:40 +0900 Subject: [PATCH 2/2] oops, the command with name, too --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index e469ac21d7..1bc4d0d463 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -128,7 +128,6 @@ EOF $output->writeln($this->getHelper('formatter')->formatSection('router', sprintf('Route "%s"', $name))); - $route = $route->compile(); $output->writeln(sprintf('Name %s', $name)); $output->writeln(sprintf('Pattern %s', $route->getPattern())); $output->writeln(sprintf('Class %s', get_class($route))); @@ -157,7 +156,7 @@ EOF } $output->writeln(sprintf('Options %s', $options)); $output->write('Regex '); - $output->writeln(preg_replace('/^ /', '', preg_replace('/^/m', ' ', $route->getRegex())), OutputInterface::OUTPUT_RAW); + $output->writeln(preg_replace('/^ /', '', preg_replace('/^/m', ' ', $route->compile()->getRegex())), OutputInterface::OUTPUT_RAW); } protected function formatValue($value)