From 549e0f3b9755e1ccdd233b52bbb115fac6cb7c65 Mon Sep 17 00:00:00 2001 From: Kieran Date: Sun, 15 Sep 2024 14:48:22 +0100 Subject: [PATCH] Fix GetAttrNode deprecation warning (#447) * Fix GetAttrNode deprecation warning * remove usage * bump version --- composer.json | 2 +- src/Node/GetAttrNode.php | 4 ++-- src/NodeVisitor/GetAttrAdjuster.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 9213b264..3286a082 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ ], "require": { "php": "^8.1", - "twig/twig": "~3.9", + "twig/twig": "~3.12", "illuminate/support": "^9|^10|^11", "illuminate/view": "^9|^10|^11" }, diff --git a/src/Node/GetAttrNode.php b/src/Node/GetAttrNode.php index af4990b7..51b22e78 100644 --- a/src/Node/GetAttrNode.php +++ b/src/Node/GetAttrNode.php @@ -31,10 +31,10 @@ class GetAttrNode extends GetAttrExpression /** * @inheritdoc */ - public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0, string $tag = null) + public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0) { // Skip parent::__construct() - Node::__construct($nodes, $attributes, $lineno, $tag); + Node::__construct($nodes, $attributes, $lineno); } /** diff --git a/src/NodeVisitor/GetAttrAdjuster.php b/src/NodeVisitor/GetAttrAdjuster.php index de70520e..d601e1b6 100644 --- a/src/NodeVisitor/GetAttrAdjuster.php +++ b/src/NodeVisitor/GetAttrAdjuster.php @@ -45,7 +45,7 @@ public function enterNode(Node $node, Environment $env): Node 'optimizable' => $node->getAttribute('optimizable'), ]; - return new GetAttrNode($nodes, $attributes, $node->getTemplateLine(), $node->getNodeTag()); + return new GetAttrNode($nodes, $attributes, $node->getTemplateLine()); } /**