@@ -129,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
129
129
if ($ output ->isVerbose ()) {
130
130
$ io ->comment ('Warming up optional cache... ' );
131
131
}
132
- $ this ->warmupOptionals ($ realCacheDir );
132
+ $ this ->warmupOptionals ($ realCacheDir, $ realBuildDir );
133
133
}
134
134
} else {
135
135
$ fs ->mkdir ($ warmupDir );
@@ -144,7 +144,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
144
144
if ($ output ->isVerbose ()) {
145
145
$ io ->comment ('Warming up optional cache... ' );
146
146
}
147
- $ this ->warmupOptionals ($ realCacheDir );
147
+ $ this ->warmupOptionals ($ useBuildDir ? $ realCacheDir : $ warmupDir , $ warmupDir );
148
148
}
149
149
}
150
150
@@ -239,15 +239,15 @@ private function warmup(string $warmupDir, string $realBuildDir): void
239
239
}
240
240
}
241
241
242
- private function warmupOptionals (string $ realCacheDir ): void
242
+ private function warmupOptionals (string $ cacheDir , string $ warmupDir ): void
243
243
{
244
244
$ kernel = $ this ->getApplication ()->getKernel ();
245
245
$ warmer = $ kernel ->getContainer ()->get ('cache_warmer ' );
246
246
// non optional warmers already ran during container compilation
247
247
$ warmer ->enableOnlyOptionalWarmers ();
248
- $ preload = (array ) $ warmer ->warmUp ($ realCacheDir );
248
+ $ preload = (array ) $ warmer ->warmUp ($ cacheDir );
249
249
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 ' )) {
251
251
Preloader::append ($ preloadFile , $ preload );
252
252
}
253
253
}
0 commit comments