Made `debug:container` and `debug:autowiring` ignore starting backslash in service id

This commit is contained in:
Ruud Kamphuis 2019-04-28 12:45:56 +02:00
parent 454574b0a3
commit 0945f27e81
2 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,8 @@ EOF
private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $name, bool $showHidden)
{
$name = ltrim($name, '\\');
if ($builder->has($name) || !$input->isInteractive()) {
return $name;
}

View File

@ -85,6 +85,7 @@ class ContainerDebugCommandTest extends WebTestCase
return [
[BackslashClass::class],
['FixturesBackslashClass'],
['\\'.BackslashClass::class],
];
}
}