diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index 07c0dc20c58d8..7a2bc7ec041d4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -30,6 +30,7 @@ + diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 86b7ebbe9dc24..fd00d52b9b672 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -415,7 +415,7 @@ protected function initializeContainer() $this->container = new $class(); $this->container->set('kernel', $this); - if ($fresh && 'cli' !== php_sapi_name()) { + if ($fresh && ('cli' !== php_sapi_name() || $container->getParameter('kernel.cache_warmup') === 'force')) { $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); } } diff --git a/src/Symfony/Component/HttpKernel/bootstrap.php b/src/Symfony/Component/HttpKernel/bootstrap.php index 699e1f11a057d..047c05e9ec0e0 100644 --- a/src/Symfony/Component/HttpKernel/bootstrap.php +++ b/src/Symfony/Component/HttpKernel/bootstrap.php @@ -683,7 +683,7 @@ protected function initializeContainer() require_once $location.'.php'; $this->container = new $class(); $this->container->set('kernel', $this); - if ($fresh && 'cli' !== php_sapi_name()) { + if ($fresh && ('cli' !== php_sapi_name() || $container->getParameter('kernel.cache_warmup') === 'force')) { $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); } } diff --git a/src/Symfony/Component/HttpKernel/bootstrap_cache.php b/src/Symfony/Component/HttpKernel/bootstrap_cache.php index e1bbfc66aa100..a50ea5e9fcc24 100644 --- a/src/Symfony/Component/HttpKernel/bootstrap_cache.php +++ b/src/Symfony/Component/HttpKernel/bootstrap_cache.php @@ -247,7 +247,7 @@ protected function initializeContainer() require_once $location.'.php'; $this->container = new $class(); $this->container->set('kernel', $this); - if ($fresh && 'cli' !== php_sapi_name()) { + if ($fresh && ('cli' !== php_sapi_name() || $container->getParameter('kernel.cache_warmup') === 'force')) { $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); } }