Skip to content

Commit

Permalink
Use findDefinition to also support alias services
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj authored and rande committed Mar 16, 2015
1 parent f4b43ee commit 23e3fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/ExtensionCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function process(ContainerBuilder $container)
$extensions = $this->getExtensionsForAdmin($id, $admin, $container, $extensionMap);

foreach ($extensions as $extension) {
if (!$container->hasDefinition($extension)) {
if (!$container->findDefinition($extension)) {
throw new \InvalidArgumentException(sprintf('Unable to find extension service for id %s', $extension));
}
$admin->addMethodCall('addExtension', array(new Reference($extension)));
Expand Down

0 comments on commit 23e3fba

Please sign in to comment.