Skip to content

Commit

Permalink
Remove deprecate usage of AssignNameExpression in For Node
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 1, 2024
1 parent c5ebc12 commit 616cd06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Node/ForNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)]);

Expand Down

0 comments on commit 616cd06

Please sign in to comment.