mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
Remove deprecate usage of AssignNameExpression in For Node
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Twig\Node;
|
||||
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)]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user