reverted #4542
This commit is contained in:
parent
1cff9502ca
commit
1a37b78078
@ -34,8 +34,6 @@ CHANGELOG
|
||||
declares how long a cookie can be stored on the remote client.
|
||||
* Removed 'auto_start' configuration parameter from session config. The session will
|
||||
start on demand.
|
||||
* Commands cache:warmup and cache:clear (unless --no-warmup is specified) now
|
||||
create the class cache.
|
||||
* [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated
|
||||
parser: TemplateFilenameParser::parse().
|
||||
* [BC BREAK] Kernel parameters are replaced by their value whereever they appear
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Command;
|
||||
|
||||
use Symfony\Component\ClassLoader\ClassCollectionLoader;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@ -64,8 +63,7 @@ EOF
|
||||
}
|
||||
|
||||
$kernel = $this->getContainer()->get('kernel');
|
||||
$debug = $kernel->isDebug();
|
||||
$output->writeln(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($debug, true)));
|
||||
$output->writeln(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
|
||||
|
||||
$this->getContainer()->get('cache_clearer')->clear($realCacheDir);
|
||||
|
||||
@ -78,21 +76,11 @@ EOF
|
||||
|
||||
rename($realCacheDir, $oldCacheDir);
|
||||
rename($warmupDir, $realCacheDir);
|
||||
|
||||
$this->createClassCache($realCacheDir, $debug);
|
||||
}
|
||||
|
||||
$this->getContainer()->get('filesystem')->remove($oldCacheDir);
|
||||
}
|
||||
|
||||
protected function createClassCache($cacheDir, $debug)
|
||||
{
|
||||
$classmap = $cacheDir.'/classes.map';
|
||||
if (is_file($classmap)) {
|
||||
ClassCollectionLoader::load(include($classmap), $cacheDir, 'classes', $debug, false, '.php');
|
||||
}
|
||||
}
|
||||
|
||||
protected function warmup($warmupDir, $enableOptionalWarmers = true)
|
||||
{
|
||||
$this->getContainer()->get('filesystem')->remove($warmupDir);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Command;
|
||||
|
||||
use Symfony\Component\ClassLoader\ClassCollectionLoader;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@ -57,12 +56,6 @@ EOF
|
||||
$warmer->enableOptionalWarmers();
|
||||
}
|
||||
|
||||
$cacheDir = $this->getContainer()->getParameter('kernel.cache_dir');
|
||||
$warmer->warmUp($cacheDir);
|
||||
|
||||
$classmap = $cacheDir.'/classes.map';
|
||||
if (is_file($classmap)) {
|
||||
ClassCollectionLoader::load(include($classmap), $cacheDir, 'classes', $kernel->isDebug(), false, '.php');
|
||||
}
|
||||
$warmer->warmUp($this->getContainer()->getParameter('kernel.cache_dir'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user