File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/Symfony/Component/HttpKernel Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -539,10 +539,16 @@ 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
+ $ preload = $ this instanceof WarmableInterface ? (array ) $ this ->warmUp ($ buildDir , $ buildDir ) : [];
543
543
544
544
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 ));
545
+ $ cacheWarmer = $ this ->container ->get ('cache_warmer ' );
546
+
547
+ if ($ this ->container ->getParameter ('kernel.cache_dir ' ) !== $ buildDir ) {
548
+ $ cacheWarmer ->enableOptionalWarmers ();
549
+ }
550
+
551
+ $ preload = array_merge ($ preload , (array ) $ cacheWarmer ->warmUp ($ buildDir , $ buildDir ));
546
552
}
547
553
548
554
if ($ preload && file_exists ($ preloadFile = $ buildDir .'/ ' .$ class .'.preload.php ' )) {
You can’t perform that action at this time.
0 commit comments