Skip to content

Commit

Permalink
Ignore services on invalid reference (#5056)
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterHolvoet committed Jan 31, 2022
1 parent 8c71d00 commit ff824f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Drupal/FindCommandsCompilerPass.php
Expand Up @@ -5,6 +5,7 @@
use Drush\Drush;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;

/**
Expand Down Expand Up @@ -64,7 +65,7 @@ public function process(ContainerBuilder $container): void
Drush::logger()->debug(dt("Found tagged service !id", ['!id' => $id]));
$definition->addMethodCall(
'addCommandReference',
[new Reference($id)]
[new Reference($id, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]
);
}
}
Expand Down

0 comments on commit ff824f4

Please sign in to comment.