argument('name'); $manager = UpdateManager::instance()->setNotesOutput($this->output); $pluginDetails = $manager->requestPluginDetails($pluginName); $code = array_get($pluginDetails, 'code'); $hash = array_get($pluginDetails, 'hash'); $this->output->writeln(sprintf('Downloading plugin: %s', $code)); $manager->downloadPlugin($code, $hash, true); $this->output->writeln(sprintf('Unpacking plugin: %s', $code)); $manager->extractPlugin($code, $hash); /* * Make sure plugin is registered */ $pluginManager = PluginManager::instance(); $pluginManager->loadPlugins(); $plugin = $pluginManager->findByIdentifier($code); $pluginManager->registerPlugin($plugin, $code); /* * Migrate plugin */ $this->output->writeln(sprintf('Migrating plugin...', $code)); $manager->updatePlugin($code); } /** * Get the console command arguments. * @return array */ protected function getArguments() { return [ ['name', InputArgument::REQUIRED, 'The name of the plugin. Eg: AuthorName.PluginName'], ]; } }