Skip to content

Commit a058ec5

Browse files
committed
Deprecate the fact that the extends and use tags are always allowed in a sandboxed template
1 parent 4b709ec commit a058ec5

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Node/CacheNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class CacheNode extends AbstractExpression
2020
{
21-
public function __construct(AbstractExpression $key, ?AbstractExpression $ttl, ?AbstractExpression $tags, Node $body, int $lineno, string $tag)
21+
public function __construct(AbstractExpression $key, ?AbstractExpression $ttl, ?AbstractExpression $tags, Node $body, int $lineno)
2222
{
2323
$body = new CaptureNode($body, $lineno);
2424
$body->setAttribute('raw', true);
@@ -31,7 +31,7 @@ public function __construct(AbstractExpression $key, ?AbstractExpression $ttl, ?
3131
$nodes['tags'] = $tags;
3232
}
3333

34-
parent::__construct($nodes, [], $lineno, $tag);
34+
parent::__construct($nodes, [], $lineno);
3535
}
3636

3737
public function compile(Compiler $compiler): void

TokenParser/CacheTokenParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function parse(Token $token): Node
5656
$body = $this->parser->subparse([$this, 'decideCacheEnd'], true);
5757
$stream->expect(Token::BLOCK_END_TYPE);
5858

59-
$body = new CacheNode($key, $ttl, $tags, $body, $token->getLine(), $this->getTag());
59+
$body = new CacheNode($key, $ttl, $tags, $body, $token->getLine());
6060

61-
return new PrintNode(new RawFilter($body), $token->getLine(), $this->getTag());
61+
return new PrintNode(new RawFilter($body), $token->getLine());
6262
}
6363

6464
public function decideCacheEnd(Token $token): bool

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"require": {
1818
"php": ">=8.0.2",
1919
"symfony/cache": "^5.4|^6.4|^7.0",
20-
"twig/twig": "^3.11"
20+
"twig/twig": "^3.12"
2121
},
2222
"require-dev": {
2323
"symfony/phpunit-bridge": "^6.4|^7.0"

0 commit comments

Comments
 (0)