Deprecate the fact that the extends and use tags are always allowed in a sandboxed template

This commit is contained in:
Fabien Potencier
2024-08-24 10:06:44 +02:00
parent df63bead99
commit 5fca700cbd
61 changed files with 210 additions and 102 deletions
+2 -2
View File
@@ -22,14 +22,14 @@ use Twig\Compiler;
#[YieldReady]
class WithNode extends Node
{
public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, ?string $tag = null)
public function __construct(Node $body, ?Node $variables, bool $only, int $lineno)
{
$nodes = ['body' => $body];
if (null !== $variables) {
$nodes['variables'] = $variables;
}
parent::__construct($nodes, ['only' => $only], $lineno, $tag);
parent::__construct($nodes, ['only' => $only], $lineno);
}
public function compile(Compiler $compiler): void