From c46e3e17486b5d31f455bfa9e544df4daab3b8eb Mon Sep 17 00:00:00 2001 From: inmarelibero Date: Sat, 2 Feb 2013 16:51:31 +0100 Subject: [PATCH] added route debug information when path matches url included required class --- .../Bundle/FrameworkBundle/Command/RouterMatchCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 1ccfa082407d..405996902b6a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -14,6 +14,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; @@ -76,6 +77,11 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { $output->writeln(sprintf('Route "%s" matches', $trace['name'])); + + $routerDebugcommand = $this->getApplication()->find('router:debug'); + $output->writeln(''); + $routerDebugcommand->run(new ArrayInput(array('name' => $trace['name'])), $output); + $matches = true; } elseif ($input->getOption('verbose')) { $output->writeln(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log']));