[FrameworkBundle] Empty event dispatcher earlier in CacheClearCommand
This commit is contained in:
parent
ecad1c4b3b
commit
a96139273f
@ -111,6 +111,9 @@ EOF
|
|||||||
$io->comment(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
$io->comment(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
||||||
$this->cacheClearer->clear($realCacheDir);
|
$this->cacheClearer->clear($realCacheDir);
|
||||||
|
|
||||||
|
// The current event dispatcher is stale, let's not use it anymore
|
||||||
|
$this->getApplication()->setDispatcher(new EventDispatcher());
|
||||||
|
|
||||||
if ($input->getOption('no-warmup')) {
|
if ($input->getOption('no-warmup')) {
|
||||||
$this->filesystem->rename($realCacheDir, $oldCacheDir);
|
$this->filesystem->rename($realCacheDir, $oldCacheDir);
|
||||||
} else {
|
} else {
|
||||||
@ -129,9 +132,6 @@ EOF
|
|||||||
|
|
||||||
$this->filesystem->remove($oldCacheDir);
|
$this->filesystem->remove($oldCacheDir);
|
||||||
|
|
||||||
// The current event dispatcher is stale, let's not use it anymore
|
|
||||||
$this->getApplication()->setDispatcher(new EventDispatcher());
|
|
||||||
|
|
||||||
if ($output->isVerbose()) {
|
if ($output->isVerbose()) {
|
||||||
$io->comment('Finished');
|
$io->comment('Finished');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user