Skip to content

Commit 1a37b78

Browse files
committed
reverted symfony#4542
1 parent 1cff950 commit 1a37b78

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ CHANGELOG
3434
declares how long a cookie can be stored on the remote client.
3535
* Removed 'auto_start' configuration parameter from session config. The session will
3636
start on demand.
37-
* Commands cache:warmup and cache:clear (unless --no-warmup is specified) now
38-
create the class cache.
3937
* [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated
4038
parser: TemplateFilenameParser::parse().
4139
* [BC BREAK] Kernel parameters are replaced by their value whereever they appear

src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Command;
1313

14-
use Symfony\Component\ClassLoader\ClassCollectionLoader;
1514
use Symfony\Component\Console\Input\InputInterface;
1615
use Symfony\Component\Console\Input\InputOption;
1716
use Symfony\Component\Console\Output\OutputInterface;
@@ -64,8 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6463
}
6564

6665
$kernel = $this->getContainer()->get('kernel');
67-
$debug = $kernel->isDebug();
68-
$output->writeln(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($debug, true)));
66+
$output->writeln(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
6967

7068
$this->getContainer()->get('cache_clearer')->clear($realCacheDir);
7169

@@ -78,21 +76,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
7876

7977
rename($realCacheDir, $oldCacheDir);
8078
rename($warmupDir, $realCacheDir);
81-
82-
$this->createClassCache($realCacheDir, $debug);
8379
}
8480

8581
$this->getContainer()->get('filesystem')->remove($oldCacheDir);
8682
}
8783

88-
protected function createClassCache($cacheDir, $debug)
89-
{
90-
$classmap = $cacheDir.'/classes.map';
91-
if (is_file($classmap)) {
92-
ClassCollectionLoader::load(include($classmap), $cacheDir, 'classes', $debug, false, '.php');
93-
}
94-
}
95-
9684
protected function warmup($warmupDir, $enableOptionalWarmers = true)
9785
{
9886
$this->getContainer()->get('filesystem')->remove($warmupDir);

src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Command;
1313

14-
use Symfony\Component\ClassLoader\ClassCollectionLoader;
1514
use Symfony\Component\Console\Input\InputInterface;
1615
use Symfony\Component\Console\Input\InputOption;
1716
use Symfony\Component\Console\Output\OutputInterface;
@@ -57,12 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
5756
$warmer->enableOptionalWarmers();
5857
}
5958

60-
$cacheDir = $this->getContainer()->getParameter('kernel.cache_dir');
61-
$warmer->warmUp($cacheDir);
62-
63-
$classmap = $cacheDir.'/classes.map';
64-
if (is_file($classmap)) {
65-
ClassCollectionLoader::load(include($classmap), $cacheDir, 'classes', $kernel->isDebug(), false, '.php');
66-
}
59+
$warmer->warmUp($this->getContainer()->getParameter('kernel.cache_dir'));
6760
}
6861
}

0 commit comments

Comments
 (0)