8000 Merge branch '3.4' into 4.2 · symfony/symfony@3481936 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3481936

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: fix tests by adapting Twig namespace changes
2 parents c58d4c2 + 823ccf0 commit 3481936

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function getVariableGetterWithoutStrictCheck($name)
5050
protected function getVariableGetterWithStrictCheck($name)
5151
{
5252
if (Environment::MAJOR_VERSION >= 2) {
53-
return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name);
53+
return sprintf('(isset($context["%1$s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new %2$s(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name, Environment::VERSION_ID >= 20700 ? '\Twig\Error\RuntimeError' : 'Twig_Error_Runtime');
5454
}
5555

5656
return sprintf('($context["%s"] ?? $this->getContext($context, "%1$s"))', $name);

0 commit comments

Comments
 (0)
0