mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 02:16:41 +00:00
Complete IncludeNode template parameter signature
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# 4.0.0 (2026-XX-XX)
|
||||
|
||||
* Add an optional `string $template = ''` argument to `IncludeNode::addGetTemplate()`; subclasses overriding this method must declare a compatible parameter
|
||||
* Remove `TemplateVariable` and `AssignTemplateVariable`; use `MacroVariable` and `AssignMacroVariable` instead
|
||||
* Add the `isAlwaysAllowedInSandbox()` method to `Twig\TwigCallableInterface` and `Twig\TokenParser\TokenParserInterface`
|
||||
* Always allow printing a `Markup` object in a sandbox, whatever the security policy is
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
- # 2 parameters will be required
|
||||
message: '#^Method Twig\\Node\\IncludeNode\:\:addGetTemplate\(\) invoked with 2 parameters, 1 required\.$#'
|
||||
identifier: arguments.count
|
||||
count: 1
|
||||
path: src/Node/IncludeNode.php
|
||||
|
||||
- # Adding 0 to the string representation of a number is valid and what we want here
|
||||
message: '#^Binary operation "\+" between 0 and string results in an error\.$#'
|
||||
identifier: binaryOp.invalid
|
||||
|
||||
@@ -79,7 +79,7 @@ class IncludeNode extends Node implements NodeOutputInterface, CoercesChildrenTo
|
||||
}
|
||||
}
|
||||
|
||||
protected function addGetTemplate(Compiler $compiler/* , string $template = '' */): void
|
||||
protected function addGetTemplate(Compiler $compiler, string $template = ''): void
|
||||
{
|
||||
$compiler
|
||||
->raw('$this->load(')
|
||||
|
||||
Reference in New Issue
Block a user