mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 20:36:33 +00:00
Complete IncludeNode template parameter signature
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# 4.0.0 (2026-XX-XX)
|
# 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
|
* Remove `TemplateVariable` and `AssignTemplateVariable`; use `MacroVariable` and `AssignMacroVariable` instead
|
||||||
* Add the `isAlwaysAllowedInSandbox()` method to `Twig\TwigCallableInterface` and `Twig\TokenParser\TokenParserInterface`
|
* 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
|
* Always allow printing a `Markup` object in a sandbox, whatever the security policy is
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
parameters:
|
parameters:
|
||||||
ignoreErrors:
|
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
|
- # 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\.$#'
|
message: '#^Binary operation "\+" between 0 and string results in an error\.$#'
|
||||||
identifier: binaryOp.invalid
|
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
|
$compiler
|
||||||
->raw('$this->load(')
|
->raw('$this->load(')
|
||||||
|
|||||||
Reference in New Issue
Block a user