From 9e418f8db5e59788ac056f831a24fdd5f258050e Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Fri, 8 Apr 2011 10:45:40 +0200 Subject: [PATCH] use .php.cache for all php files generated into the cache dir --- src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php | 2 +- src/Symfony/Component/ClassLoader/ClassCollectionLoader.php | 2 +- src/Symfony/Component/HttpKernel/Kernel.php | 2 +- src/Symfony/Component/Routing/Router.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index 92d5a817fc845..754917f7507f1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -89,7 +89,7 @@ protected function loadCatalogue($locale) return parent::loadCatalogue($locale); } - $cache = new ConfigCache($this->options['cache_dir'].'/catalogue.'.$locale.'.php', $this->options['debug']); + $cache = new ConfigCache($this->options['cache_dir'].'/catalogue.'.$locale.'.php.cache', $this->options['debug']); if (!$cache->isFresh()) { $this->initialize(); diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 3b731d1a81d28..fe34e59bb310b 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -32,7 +32,7 @@ class ClassCollectionLoader * * @throws \InvalidArgumentException When class can't be loaded */ - static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') + static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php.cache') { // each $name can only be loaded once per PHP process if (isset(self::$loaded[$name])) { diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 6de1f38554cfd..623720b6f0f0b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -443,7 +443,7 @@ protected function getContainerClass() protected function initializeContainer() { $class = $this->getContainerClass(); - $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug); + $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php.cache', $this->debug); $fresh = true; if (!$cache->isFresh()) { $container = $this->buildContainer(); diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 5e5961d5e4ebb..61e2626ac74ce 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -154,7 +154,7 @@ public function getMatcher() } $class = $this->options['matcher_cache_class']; - $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php', $this->options['debug']); + $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php.cache', $this->options['debug']); if (!$cache->isFresh($class)) { $dumper = new $this->options['matcher_dumper_class']($this->getRouteCollection()); @@ -187,7 +187,7 @@ public function getGenerator() } $class = $this->options['generator_cache_class']; - $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php', $this->options['debug']); + $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php.cache', $this->options['debug']); if (!$cache->isFresh($class)) { $dumper = new $this->options['generator_dumper_class']($this->getRouteCollection());