3 namespace Drush\Drupal;
5 use Drush\Log\LogLevel;
6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
7 use Drupal\Core\DependencyInjection\ContainerBuilder;
9 class DrushServiceModfier implements ServiceModifierInterface
14 public function alter(ContainerBuilder $container) {
15 drush_log(dt("service modifier alter"), LogLevel::DEBUG);
16 // http://symfony.com/doc/2.7/components/dependency_injection/tags.html#register-the-pass-with-the-container
17 $container->register('drush.service.consolecommands', 'Drush\Command\ServiceCommandlist');
18 $container->addCompilerPass(new FindCommandsCompilerPass('drush.service.consolecommands', 'drush.command'));
19 $container->register('drush.service.consolidationcommands', 'Drush\Command\ServiceCommandlist');
20 $container->addCompilerPass(new FindCommandsCompilerPass('drush.service.consolidationcommands', 'consolidation.commandhandler'));