From 616cd06914b27a7b5c9e2361431a8d00f8ef3f8a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 1 Dec 2024 10:44:44 +0100 Subject: [PATCH] Remove deprecate usage of AssignNameExpression in For Node --- src/Node/ForNode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Node/ForNode.php b/src/Node/ForNode.php index 53a950a90ca..4346afe5860 100644 --- a/src/Node/ForNode.php +++ b/src/Node/ForNode.php @@ -15,7 +15,7 @@ use Twig\Attribute\YieldReady; use Twig\Compiler; use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Expression\AssignNameExpression; +use Twig\Node\Expression\Variable\AssignContextVariable; /** * Represents a for node. @@ -27,7 +27,7 @@ class ForNode extends Node { private $loop; - public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?Node $ifexpr, Node $body, ?Node $else, int $lineno) + public function __construct(AssignContextVariable $keyTarget, AssignContextVariable $valueTarget, AbstractExpression $seq, ?Node $ifexpr, Node $body, ?Node $else, int $lineno) { $body = new Nodes([$body, $this->loop = new ForLoopNode($lineno)]);