Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b1147e

Browse filesBrowse files
committed
merged branch inmarelibero/2.2-RouterMatch (PR symfony#6950)
This PR was submitted for the 2.2 branch but it was merged into the master branch instead (closes symfony#6950). Discussion ---------- [2.3] [FrameworkBundle] added route debug information when path matches url the result of the command `app/console router:match /demo/hello/foo` would be: ![Schermata 02-2456326 alle 17 04 42](https://f.cloud.github.com/assets/254808/120934/a1499432-6d52-11e2-8b67-46a164c30ea0.png) instead of just: Route "_demo_hello" matches Commits ------- 36098e1 [FrameworkBundle] added route debug information when path matches url
2 parents 1d778cf + c46e3e1 commit 3b1147e
Copy full SHA for 3b1147e

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Console\Input\InputArgument;
1515
use Symfony\Component\Console\Input\InputInterface;
1616
use Symfony\Component\Console\Output\OutputInterface;
17+
use Symfony\Component\Console\Input\ArrayInput;
1718
use Symfony\Component\Routing\RouterInterface;
1819
use Symfony\Component\Routing\Matcher\TraceableUrlMatcher;
1920

@@ -76,6 +77,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
7677
$output->writeln(sprintf('<fg=yellow>Route "%s" almost matches but %s</>', $trace['name'], lcfirst($trace['log'])));
7778
} elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) {
7879
$output->writeln(sprintf('<fg=green>Route "%s" matches</>', $trace['name']));
80+
81+
$routerDebugcommand = $this->getApplication()->find('router:debug');
82+
$output->writeln('');
83+
$routerDebugcommand->run(new ArrayInput(array('name' => $trace['name'])), $output);
84+
7985
$matches = true;
8086
} elseif ($input->getOption('verbose')) {
8187
$output->writeln(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log']));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.