File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -521,10 +521,17 @@ protected function initializeContainer(): void
521
521
touch ($ oldContainerDir .'.legacy ' );
522
522
}
523
523
524
- $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ) : [];
524
+ $ cacheDir = $ this ->container ->getParameter ('kernel.cache_dir ' );
525
+ $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ cacheDir , $ buildDir ) : [];
525
526
526
527
if ($ this ->container ->has ('cache_warmer ' )) {
527
- $ preload = array_merge ($ preload , (array ) $ this ->container ->get ('cache_warmer ' )->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ));
528
+ $ cacheWarmer = $ this ->container ->get ('cache_warmer ' );
529
+
530
+ if ($ cacheDir !== $ buildDir ) {
531
+ $ cacheWarmer ->enableOptionalWarmers ();
532
+ }
533
+
534
+ $ preload = array_merge ($ preload , (array ) $ cacheWarmer ->warmUp ($ cacheDir , $ buildDir ));
528
535
}
529
536
530
537
if ($ preload && file_exists ($ preloadFile = $ buildDir .'/ ' .$ class .'.preload.php ' )) {
You can’t perform that action at this time.
0 commit comments