You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Node/Expression/GetAttrExpression.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
15
15
useTwig\Compiler;
16
16
useTwig\Extension\SandboxExtension;
17
+
useTwig\Node\Expression\Variable\ContextVariable;
17
18
useTwig\Template;
18
19
19
20
class GetAttrExpression extends AbstractExpression
@@ -28,7 +29,7 @@ public function __construct(AbstractExpression $node, AbstractExpression $attrib
28
29
$nodes['arguments'] = $arguments;
29
30
}
30
31
31
-
if ($arguments && !$argumentsinstanceof ArrayExpression && !$argumentsinstanceofNameExpression) {
32
+
if ($arguments && !$argumentsinstanceof ArrayExpression && !$argumentsinstanceofContextVariable) {
32
33
trigger_deprecation('twig/twig', '3.15', \sprintf('Not passing a "%s" instance as the "arguments" argument of the "%s" constructor is deprecated ("%s" given).', ArrayExpression::class, static::class, $arguments::class));
Copy file name to clipboardExpand all lines: src/Node/Expression/Test/DefinedTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@
24
24
useTwig\Node\Expression\MethodCallExpression;
25
25
useTwig\Node\Expression\NameExpression;
26
26
useTwig\Node\Expression\TestExpression;
27
+
useTwig\Node\Expression\Variable\ContextVariable;
27
28
useTwig\Node\Node;
28
29
useTwig\TwigTest;
29
30
@@ -49,7 +50,7 @@ public function __construct(Node $node, TwigTest|string $name, ?Node $arguments,
49
50
trigger_deprecation('twig/twig', '3.15', 'Not passing a "%s" instance to the "node" argument of "%s" is deprecated ("%s" given).', AbstractExpression::class, static::class, \get_class($node));
0 commit comments