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 21bbad9

Browse filesBrowse files
committed
update test for Twig performance optimizations
1 parent c645335 commit 21bbad9
Copy full SHA for 21bbad9

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
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
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ protected function getVariableGetterWithoutStrictCheck($name)
5757

5858
protected function getVariableGetterWithStrictCheck($name)
5959
{
60+
if (Environment::VERSION_ID > 20404) {
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->source); })())', $name);
62+
}
63+
6064
if (Environment::MAJOR_VERSION >= 2) {
6165
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);
6266
}

0 commit comments

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