/** * Handles the "package --delete" command. * * @param Args $args The console arguments. * * @return int The status code. */ public function handleDelete(Args $args) { $packageName = $args->getArgument('name'); if (!$this->packageManager->hasPackage($packageName)) { throw new RuntimeException(sprintf('The package "%s" is not installed.', $packageName)); } $this->packageManager->removePackage($packageName); return 0; }