privates['console.command.cache_clear'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand(new \Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer(new RewindableGenerator(fn () => new \EmptyIterator(), 0)), ($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem())); $instance->setName('cache:clear'); $instance->setDescription('Clear the cache'); return $instance; } }