Updated the styles for the "cache:warmup" command
This commit is contained in:
parent
08b29598c4
commit
44c54160a5
@ -14,6 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
/**
|
||||
* Warmup the cache.
|
||||
@ -53,8 +54,10 @@ EOF
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
|
||||
$kernel = $this->getContainer()->get('kernel');
|
||||
$output->writeln(sprintf('Warming up the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
||||
$output->comment(sprintf('Warming up the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
||||
|
||||
$warmer = $this->getContainer()->get('cache_warmer');
|
||||
|
||||
@ -63,5 +66,7 @@ EOF
|
||||
}
|
||||
|
||||
$warmer->warmUp($this->getContainer()->getParameter('kernel.cache_dir'));
|
||||
|
||||
$output->success(sprintf('Cache for the "%s" environment (debug=%s) was succesfully warmed.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user