Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vagrant transport to Drush. #4036

Merged
merged 3 commits into from
Apr 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/Runtime/DependencyInjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Drush\Command\DrushCommandInfoAlterer;
use Consolidation\Config\Util\ConfigOverlay;
use Drush\Config\DrushConfig;
use Drush\SiteAlias\ProcessManager;

/**
* Prepare our Dependency Injection Container
Expand Down Expand Up @@ -109,13 +110,9 @@ protected function addDrushServices(ContainerInterface $container, ClassLoader $
$container->share('bootstrap.hook', 'Drush\Boot\BootstrapHook')
->withArgument('bootstrap.manager');
$container->share('tildeExpansion.hook', 'Drush\Runtime\TildeExpansionHook');
$container->share('ssh.transport', \Consolidation\SiteProcess\Factory\SshTransportFactory::class);
$container->share('docker-compose.transport', \Consolidation\SiteProcess\Factory\DockerComposeTransportFactory::class);
$container->share('process.manager', 'Drush\SiteAlias\ProcessManager')
$container->share('process.manager', ProcessManager::class)
->withMethodCall('setConfig', ['config'])
->withMethodCall('setConfigRuntime', ['config.runtime'])
->withMethodCall('add', ['ssh.transport'])
->withMethodCall('add', ['docker-compose.transport']);
->withMethodCall('setConfigRuntime', ['config.runtime']);
$container->share('redispatch.hook', 'Drush\Runtime\RedispatchHook')
->withArgument('process.manager');

Expand Down Expand Up @@ -162,6 +159,8 @@ protected function alterServicesForDrush(ContainerInterface $container, Applicat

$commandProcessor = $container->get('commandProcessor');
$commandProcessor->setPassExceptions(true);

ProcessManager::addTransports($container->get('process.manager'));
}

protected function injectApplicationServices(ContainerInterface $container, Application $application)
Expand Down