Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c7f46e4

Browse filesBrowse files
committed
minor #29892 [TwigBridge] remove unreachable code (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBridge] remove unreachable code | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | 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. Commits ------- 16f97b9 remove unreachable code
2 parents 0f0c30a + 16f97b9 commit c7f46e4
Copy full SHA for c7f46e4

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,8 @@ protected function getVariableGetterWithoutStrictCheck($name)
5353

5454
protected function getVariableGetterWithStrictCheck($name)
5555
{
56-
if (Environment::VERSION_ID > 20404) {
57-
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);
58-
}
59-
6056
if (Environment::MAJOR_VERSION >= 2) {
61-
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);
57+
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);
6258
}
6359

6460
if (\PHP_VERSION_ID >= 70000) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.