File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/Symfony/Component/HttpKernel Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -539,10 +539,17 @@ protected function initializeContainer()
539
539
touch ($ oldContainerDir .'.legacy ' );
540
540
}
541
541
542
- $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ) : [];
542
+ $ cacheDir = $ this ->container ->getParameter ('kernel.cache_dir ' );
543
+ $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ cacheDir , $ buildDir ) : [];
543
544
544
545
if ($ this ->container ->has ('cache_warmer ' )) {
545
- $ preload = array_merge ($ preload , (array ) $ this ->container ->get ('cache_warmer ' )->warmUp ($ this ->container ->getParameter ('kernel.cache_dir ' ), $ buildDir ));
546
+ $ cacheWarmer = $ this ->container ->get ('cache_warmer ' );
547
+
548
+ if ($ cacheDir !== $ buildDir ) {
549
+ $ cacheWarmer ->enableOptionalWarmers ();
550
+ }
551
+
552
+ $ preload = array_merge ($ preload , (array ) $ cacheWarmer ->warmUp ($ cacheDir , $ buildDir ));
546
553
}
547
554
548
555
if ($ preload && file_exists ($ preloadFile = $ buildDir .'/ ' .$ class .'.preload.php ' )) {
You can’t perform that action at this time.
0 commit comments