Skip to content

Commit

Permalink
minor #4489 Remove deprecate usage of AssignNameExpression in For Nod…
Browse files Browse the repository at this point in the history
…e (fabpot)

This PR was merged into the 3.x branch.

Discussion
----------

Remove deprecate usage of AssignNameExpression in For Node

Commits
-------

616cd06 Remove deprecate usage of AssignNameExpression in For Node
  • Loading branch information
fabpot committed Dec 1, 2024
2 parents c5ebc12 + 616cd06 commit 6cc64f2
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 6cc64f2

Please sign in to comment.