bug #2125 fixed Twig cache sharing when used with different versions of PHP (fabpot)

This PR was merged into the 1.x branch.

Discussion
----------

fixed Twig cache sharing when used with different versions of PHP

closes #2013

Commits
-------

ecd020d fixed Twig cache sharing when used with different versions of PHP
This commit is contained in:
Fabien Potencier
2016-09-20 10:25:50 -07:00
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
* 1.25.0 (2016-XX-XX)
* fixed Twig cache sharing when used with different versions of PHP
* removed embed parent workaround for simple use cases
* deprecated the ability to store non Node instances in Node::$nodes
* deprecated Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler()
+1
View File
@@ -312,6 +312,7 @@ class Twig_Environment
$key = $this->getLoader()->getCacheKey($name);
$key .= json_encode(array_keys($this->extensions));
$key .= function_exists('twig_template_get_attributes');
$key .= ':'.PHP_MAJOR_VERSION.':'.PHP_MINOR_VERSION;
return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
}