Skip to content

Commit

Permalink
Made debug:container and debug:autowiring ignore starting backsla…
Browse files Browse the repository at this point in the history
…sh in service id
  • Loading branch information
ruudk committed Apr 29, 2019
1 parent 4c4e29e commit e6827e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Command/ContainerDebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ protected function getContainerBuilder()

private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $name, bool $showHidden)
{
$name = ltrim($name, '\\');

if ($builder->has($name) || !$input->isInteractive()) {
return $name;
}
Expand Down
1 change: 1 addition & 0 deletions Tests/Functional/ContainerDebugCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function provideIgnoreBackslashWhenFindingService()
return [
[BackslashClass::class],
['FixturesBackslashClass'],
['\\'.BackslashClass::class],
];
}
}

0 comments on commit e6827e8

Please sign in to comment.