setName('extension:purge') ->setDescription('Purges the specified extension.') ->addArgument( 'extension-name', InputArgument::REQUIRED, 'Name of the extension' ) ; } protected function execute(InputInterface $input, OutputInterface $output) { $name = $input->getArgument('extension-name'); $this->manager->purge($name); $this->manager->load_extensions(); if ($this->manager->enabled($name)) { $output->writeln("Could not purge extension $name"); return 1; } else { $output->writeln("Successfully purge extension $name"); return 0; } } }