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 @@ -528,10 +528,17 @@ protected function initializeContainer(): void
528
528
touch ($ oldContainerDir .'.legacy ' );
529
529
}
530
530
531
- $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ) : [];
531
+ $ cacheDir = $ this ->container ->getParameter ('kernel.cache_dir ' );
532
+ $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ cacheDir , $ buildDir ) : [];
532
533
533
534
if ($ this ->container ->has ('cache_warmer ' )) {
534
- $ preload = array_merge ($ preload , (array ) $ this ->container ->get ('cache_warmer ' )->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ));
535
+ $ cacheWarmer = $ this ->container ->get ('cache_warmer ' );
536
+
537
+ if ($ cacheDir !== $ buildDir ) {
538
+ $ cacheWarmer ->enableOptionalWarmers ();
539
+ }
540
+
541
+ $ preload = array_merge ($ preload , (array ) $ cacheWarmer ->warmUp ($ cacheDir , $ buildDir ));
535
542
}
536
543
537
544
if ($ preload && file_exists ($ preloadFile = $ buildDir .'/ ' .$ class .'.preload.php ' )) {
You can’t perform that action at this time.
0 commit comments