Skip to content

Commit 8b5e0a1

Browse files
committed
Remove deprecated code
1 parent ea8aadf commit 8b5e0a1

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/Node/MacroNode.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Twig\Compiler;
1616
use Twig\Error\SyntaxError;
1717
use Twig\Node\Expression\ArrayExpression;
18-
use Twig\Node\Expression\Variable\LocalVariable;
1918

2019
/**
2120
* Represents a macro node.
@@ -31,20 +30,6 @@ class MacroNode extends Node
3130

3231
public function __construct(string $name, BodyNode $body, ArrayExpression $arguments, int $lineno)
3332
{
34-
if (!$body instanceof BodyNode) {
35-
trigger_deprecation('twig/twig', '3.12', \sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated ("%s" given).', BodyNode::class, static::class, $body::class));
36-
}
37-
38-
if (!$arguments instanceof ArrayExpression) {
39-
trigger_deprecation('twig/twig', '3.15', \sprintf('Not passing a "%s" instance as the "arguments" argument of the "%s" constructor is deprecated ("%s" given).', ArrayExpression::class, static::class, $arguments::class));
40-
41-
$args = new ArrayExpression([], $arguments->getTemplateLine());
42-
foreach ($arguments as $n => $default) {
43-
$args->addElement($default, new LocalVariable($n, $default->getTemplateLine()));
44-
}
45-
$arguments = $args;
46-
}
47-
4833
$seen = [];
4934
foreach ($arguments->getKeyValuePairs() as $pair) {
5035
$argName = $pair['key']->getAttribute('name');

0 commit comments

Comments
 (0)