Skip to content

Commit ba877c0

Browse files
committed
Fixed tag deprecation in perline node
1 parent ced4003 commit ba877c0

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"doctrine/inflector": "^2.0.8",
1616
"doctrine/orm": "^2.17.2",
1717
"symfony/filesystem": "^5.4||^6.0",
18-
"twig/twig": "^3.9.3"
18+
"twig/twig": "^3.14.2"
1919
},
2020
"require-dev": {
2121
"composer/composer": "^2.0.0",

src/Twig/PerLineNode.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,17 @@ class PerLineNode extends Node
3333
/**
3434
* Create new PerLineNode
3535
*
36-
* @param Node $lines
37-
* @param string $prefix
38-
* @param string $postfix
39-
* @param int $lineno
40-
* @param string $tag
36+
* @param Node $lines
37+
* @param string $prefix
38+
* @param string $postfix
39+
* @param int $lineno
4140
*/
42-
public function __construct(Node $lines, $prefix, $postfix, $lineno, $tag = 'perline')
41+
public function __construct(Node $lines, $prefix, $postfix, $lineno)
4342
{
4443
parent::__construct(
4544
['lines' => $lines],
4645
['prefix' => $prefix, 'postfix' => $postfix],
47-
$lineno,
48-
$tag
46+
$lineno
4947
);
5048
}
5149

src/Twig/PerLineTokenParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private function parseBody(Node $body): PerLineNode
8282
// tag. This is the case when the perline tags could be removed without
8383
// an effect in the generated code.
8484
if (count($body) === 0) {
85-
return new PerLineNode($body, '', '', $lineno, $this->getTag());
85+
return new PerLineNode($body, '', '', $lineno);
8686
}
8787

8888
// Get all the nodes as array, because it will be modified.
@@ -114,6 +114,6 @@ private function parseBody(Node $body): PerLineNode
114114
}
115115

116116
// Return the new structured node.
117-
return new PerLineNode($nodes, $prefix, $postfix, $lineno, $this->getTag());
117+
return new PerLineNode($nodes, $prefix, $postfix, $lineno);
118118
}
119119
}

0 commit comments

Comments
 (0)