Skip to content

Commit 0e7e1ee

Browse files
Merge branch '5.4' into 6.2
* 5.4: [PhpUnitBridge] Kill the last concurrent process when it stales for more than 60s [Intl] fix test [Intl] Use VarExporter::export() in PhpBundleWriter Use triggering class to generate baseline for deprecation messages from DebugClassLoader [Security] Fix false-string handling in RememberMeAuthenticator [CssSelector] Tests on Xpath translator will always pass [Serializer] Fix Normalizer not utilizing converted name for index variadic param [DepdencyInjection] Fix costly logic when checking errored definitions fix children cond [DoctrineBridge] Load refreshed user proxy [DependencyInjection] Don't ignore attributes on the actual decorator [FrameworkBundle] Prevent `cache:clear` to lose files on subsequent runs
2 parents 9f96892 + 16626db commit 0e7e1ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Command/CacheClearCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
129129
if ($output->isVerbose()) {
130130
$io->comment('Warming up optional cache...');
131131
}
132-
$this->warmupOptionals($realCacheDir);
132+
$this->warmupOptionals($realCacheDir, $realBuildDir);
133133
}
134134
} else {
135135
$fs->mkdir($warmupDir);
@@ -144,7 +144,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
144144
if ($output->isVerbose()) {
145145
$io->comment('Warming up optional cache...');
146146
}
147-
$this->warmupOptionals($realCacheDir);
147+
$this->warmupOptionals($useBuildDir ? $realCacheDir : $warmupDir, $warmupDir);
148148
}
149149
}
150150

@@ -239,15 +239,15 @@ private function warmup(string $warmupDir, string $realBuildDir): void
239239
}
240240
}
241241

242-
private function warmupOptionals(string $realCacheDir): void
242+
private function warmupOptionals(string $cacheDir, string $warmupDir): void
243243
{
244244
$kernel = $this->getApplication()->getKernel();
245245
$warmer = $kernel->getContainer()->get('cache_warmer');
246246
// non optional warmers already ran during container compilation
247247
$warmer->enableOnlyOptionalWarmers();
248-
$preload = (array) $warmer->warmUp($realCacheDir);
248+
$preload = (array) $warmer->warmUp($cacheDir);
249249

250-
if ($preload && file_exists($preloadFile = $realCacheDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) {
250+
if ($preload && file_exists($preloadFile = $warmupDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) {
251251
Preloader::append($preloadFile, $preload);
252252
}
253253
}

0 commit comments

Comments
 (0)