From 870a49f5cddcd062237a953a2e4d259afa6aa030 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Mon, 7 Feb 2011 22:57:36 +0100 Subject: [PATCH 1/2] make it possible to force cache warming --- src/Symfony/Component/HttpKernel/Kernel.php | 2 +- src/Symfony/Component/HttpKernel/bootstrap.php | 2 +- src/Symfony/Component/HttpKernel/bootstrap_cache.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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')); } } From f32f14f453d18f0f82927130ee1f33777e009daf Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Mon, 7 Feb 2011 23:18:36 +0100 Subject: [PATCH 2/2] updated XSD --- .../FrameworkBundle/Resources/config/schema/symfony-1.0.xsd | 1 + 1 file changed, 1 insertion(+) 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 @@ +