merged branch ganchiku/compiledroute_bcbreak_fix (PR #5333)
Commits -------472dfdc
oops, the command with name, toob1a9587
fixed bug related to the change PR #5326 Discussion ---------- fixed bug related to the change PR #5326 PR #5326 cause error on debugging command for route. compiledroute does not have getRequirements anymore, so should use not compiled route instead.
This commit is contained in:
commit
a1e6cfbe15
@ -77,10 +77,7 @@ EOF
|
|||||||
protected function outputRoutes(OutputInterface $output, $routes = null)
|
protected function outputRoutes(OutputInterface $output, $routes = null)
|
||||||
{
|
{
|
||||||
if (null === $routes) {
|
if (null === $routes) {
|
||||||
$routes = array();
|
$routes = $this->getContainer()->get('router')->getRouteCollection()->all();
|
||||||
foreach ($this->getContainer()->get('router')->getRouteCollection()->all() as $name => $route) {
|
|
||||||
$routes[$name] = $route->compile();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$output->writeln($this->getHelper('formatter')->formatSection('router', 'Current routes'));
|
$output->writeln($this->getHelper('formatter')->formatSection('router', 'Current routes'));
|
||||||
@ -131,7 +128,6 @@ EOF
|
|||||||
|
|
||||||
$output->writeln($this->getHelper('formatter')->formatSection('router', sprintf('Route "%s"', $name)));
|
$output->writeln($this->getHelper('formatter')->formatSection('router', sprintf('Route "%s"', $name)));
|
||||||
|
|
||||||
$route = $route->compile();
|
|
||||||
$output->writeln(sprintf('<comment>Name</comment> %s', $name));
|
$output->writeln(sprintf('<comment>Name</comment> %s', $name));
|
||||||
$output->writeln(sprintf('<comment>Pattern</comment> %s', $route->getPattern()));
|
$output->writeln(sprintf('<comment>Pattern</comment> %s', $route->getPattern()));
|
||||||
$output->writeln(sprintf('<comment>Class</comment> %s', get_class($route)));
|
$output->writeln(sprintf('<comment>Class</comment> %s', get_class($route)));
|
||||||
@ -160,7 +156,7 @@ EOF
|
|||||||
}
|
}
|
||||||
$output->writeln(sprintf('<comment>Options</comment> %s', $options));
|
$output->writeln(sprintf('<comment>Options</comment> %s', $options));
|
||||||
$output->write('<comment>Regex</comment> ');
|
$output->write('<comment>Regex</comment> ');
|
||||||
$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)
|
protected function formatValue($value)
|
||||||
|
Reference in New Issue
Block a user