mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 14:36:52 +00:00
Merge branch '3.x' into 4.x
* 3.x: Remove the templateClassPrefix property on Environment
This commit is contained in:
+1
-2
@@ -68,7 +68,6 @@ class Environment
|
||||
*/
|
||||
private array $loadedTemplates;
|
||||
private bool $strictVariables;
|
||||
private string $templateClassPrefix = '__TwigTemplate_';
|
||||
private CacheInterface|string|false $originalCache;
|
||||
private ExtensionSet $extensionSet;
|
||||
/**
|
||||
@@ -280,7 +279,7 @@ class Environment
|
||||
{
|
||||
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
|
||||
|
||||
return $this->templateClassPrefix.hash('xxh128', $key).(null === $index ? '' : '___'.$index);
|
||||
return '__TwigTemplate_'.hash('xxh128', $key).(null === $index ? '' : '___'.$index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -186,10 +186,6 @@ abstract class IntegrationTestCase extends TestCase
|
||||
$twig->addFunction($function);
|
||||
}
|
||||
|
||||
// avoid using the same PHP class name for different cases
|
||||
$p = new \ReflectionProperty($twig, 'templateClassPrefix');
|
||||
$p->setValue($twig, '__TwigTemplate_'.hash('xxh128', random_bytes(32), false).'_');
|
||||
|
||||
$deprecations = [];
|
||||
try {
|
||||
$prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$prevHandler) {
|
||||
|
||||
Reference in New Issue
Block a user