/** * Install the specified module. * * @param string $name * @param string $version * @param string $type * @param bool $tree */ private function install($name, $version = 'dev-master', $type = 'composer', $tree = false) { $installer = new Installer($name, $version, $type ?: $this->getStringOption('type'), $tree ?: $this->getBoolOption('tree')); $installer->setRepository(workbench()); $installer->setConsole($this); if ($timeout = $this->option('timeout')) { $installer->setTimeout((int) $timeout); } if ($path = $this->getStringOption('path')) { $installer->setPath($path); } $installer->run(); if (!$this->option('no-update')) { $this->call('module:update', ['module' => $installer->getModuleName()]); } }
/** * Install the specified module. * * @param string $name * @param string $version * @param string $type * @param bool $subtree * * @return \Symfony\Component\Process\Process */ public function install($name, $version = 'dev-master', $type = 'composer', $subtree = false) { $installer = new Installer($name, $version, $type, $subtree); return $installer->run(); }