setName('cache:clear') ->setDescription('This command clears the cache'); } protected function execute(InputInterface $input, OutputInterface $output): int { global $hooks; $hooks = new Hooks(); $hooks->load(); $hooks->trigger(HOOK_INIT); $io = new SymfonyStyle($input, $output); if (!clearCache()) { $io->error('Unknown error on clear cache'); return Command::FAILURE; } $io->success('Cache cleared'); return Command::SUCCESS; } }