Skip to content

Commit

Permalink
Fixes Twig 3.15 new Node() deprecation in LaravelEventNodeVisitor (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudiedirkx authored Feb 1, 2025
1 parent 418de7c commit f6cbdb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/NodeVisitor/LaravelEventNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function enterNode(Node $node, Environment $env): Node
$isEmbedded = false;
}
if (!$isEmbedded) {
$node->setNode('display_start', new Node([new EventNode(), $node->getNode('display_start')]));
$displayStartNodes = $node->getNode('display_start');
$displayStartNodes->setNode(count($displayStartNodes), new EventNode());
}
}
return $node;
Expand Down

0 comments on commit f6cbdb9

Please sign in to comment.