8000 use .php.cache for all php files generated into the cache dir by lsmith77 · Pull Request #511 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

use .php.cache for all php files generated into the cache dir #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -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());

Expand Down
0