From 16f97b9769144931f00d7f523c4a35db85299ca3 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 15 Jan 2019 14:09:02 +0100 Subject: [PATCH] remove unreachable code Since our version constraint is `^1.37.1|^2.6.2` any Twig version that is below 2.4.5 must be a Twig 1.x release. --- src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php b/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php index 6e61a7d66a..9fe0861376 100644 --- a/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php @@ -53,12 +53,8 @@ class TransNodeTest extends TestCase protected function getVariableGetterWithStrictCheck($name) { - if (Environment::VERSION_ID > 20404) { - 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); - } - if (Environment::MAJOR_VERSION >= 2) { - 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->getSourceContext()); })())', $name); + 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); } if (\PHP_VERSION_ID >= 70000) {