protected function execute(InputInterface $input, OutputInterface $output) { $cacheDir = $input->getArgument('cache'); $text = ""; if (file_exists($cacheDir)) { $gc = new GarbageCollector($cacheDir); if (file_exists($gc->getLockPath())) { unlink($gc->getLockPath()); } $text .= "<info>Garbage collection unlocked.</info>" . PHP_EOL; } else { $text .= "<error>Cache directory does not exist.</error>" . PHP_EOL; } $output->writeln($text); }