@@ -137,7 +137,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
137
137
if ($ output ->isVerbose ()) {
138
138
$ io ->comment ('Warming up optional cache... ' );
139
139
}
140
- $ this ->warmupOptionals ($ realCacheDir );
140
+ $ this ->warmupOptionals ($ realCacheDir, $ realBuildDir );
141
141
}
142
142
} else {
143
143
$ fs ->mkdir ($ warmupDir );
@@ -152,7 +152,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
152
152
if ($ output ->isVerbose ()) {
153
153
$ io ->comment ('Warming up optional cache... ' );
154
154
}
155
- $ this ->warmupOptionals ($ realCacheDir );
155
+ $ this ->warmupOptionals ($ useBuildDir ? $ realCacheDir : $ warmupDir , $ warmupDir );
156
156
}
157
157
}
158
158
@@ -247,15 +247,15 @@ private function warmup(string $warmupDir, string $realBuildDir): void
247
247
}
248
248
}
249
249
250
- private function warmupOptionals (string $ realCacheDir ): void
250
+ private function warmupOptionals (string $ cacheDir , string $ warmupDir ): void
251
251
{
252
252
$ kernel = $ this ->getApplication ()->getKernel ();
253
253
$ warmer = $ kernel ->getContainer ()->get ('cache_warmer ' );
254
254
// non optional warmers already ran during container compilation
255
255
$ warmer ->enableOnlyOptionalWarmers ();
256
- $ preload = (array ) $ warmer ->warmUp ($ realCacheDir );
256
+ $ preload = (array ) $ warmer ->warmUp ($ cacheDir );
257
257
258
- if ($ preload && file_exists ($ preloadFile = $ realCacheDir .'/ ' .$ kernel ->getContainer ()->getParameter ('kernel.container_class ' ).'.preload.php ' )) {
258
+ if ($ preload && file_exists ($ preloadFile = $ warmupDir .'/ ' .$ kernel ->getContainer ()->getParameter ('kernel.container_class ' ).'.preload.php ' )) {
259
259
Preloader::append ($ preloadFile , $ preload );
260
260
}
261
261
}
0 commit comments