public function install(array $install = [], $packagist = false, $preferSource = false)
{
$this->composer->install($install, $packagist, $preferSource);
$packages = App::package()->all(null, true);
foreach ($install as $name => $version) {
if (isset($packages[$name]) && App::module($packages[$name]->get('module'))) {
$this->enable($packages[$name]);
} elseif (isset($packages[$name])) {
$this->doInstall($packages[$name]);
}
}
}
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $packages = []; foreach ((array) $this->argument('packages') as $argument) { $argument = explode(':', $argument); $packages[$argument[0]] = isset($argument[1]) && $argument[1] ? $argument[1] : '*'; } $installer = new PackageManager($output); $installer->install($packages); }