Issue #3477374 by finnsky, longwave, bbrala: Fix "The "tag" constructor argument of the "Drupal\\Core\\Template\\TwigNodeTrans" class is deprecated and ignored"
(cherry picked from commit cec21638d0
)
merge-requests/9680/head
parent
ec293e3f12
commit
193eca8964
|
@ -68,5 +68,4 @@
|
||||||
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "add_component_context" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "add_component_context" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
||||||
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "render_var" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "render_var" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
||||||
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "validate_component_props" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
%Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "validate_component_props" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
|
||||||
%Since twig/twig 3.12: The "tag" constructor argument of the "Drupal\\Core\\Template\\TwigNodeTrans" class is deprecated and ignored%
|
|
||||||
%Since twig/twig 3.12: Twig Filter "spaceless" is deprecated%
|
%Since twig/twig 3.12: Twig Filter "spaceless" is deprecated%
|
||||||
|
|
|
@ -32,7 +32,7 @@ class TwigNodeTrans extends Node {
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function __construct(Node $body, ?Node $plural = NULL, ?AbstractExpression $count = NULL, ?AbstractExpression $options = NULL, $lineno = 0, $tag = NULL) {
|
public function __construct(Node $body, ?Node $plural = NULL, ?AbstractExpression $count = NULL, ?AbstractExpression $options = NULL, $lineno = 0) {
|
||||||
$nodes['body'] = $body;
|
$nodes['body'] = $body;
|
||||||
if ($count !== NULL) {
|
if ($count !== NULL) {
|
||||||
$nodes['count'] = $count;
|
$nodes['count'] = $count;
|
||||||
|
@ -43,7 +43,7 @@ class TwigNodeTrans extends Node {
|
||||||
if ($options !== NULL) {
|
if ($options !== NULL) {
|
||||||
$nodes['options'] = $options;
|
$nodes['options'] = $options;
|
||||||
}
|
}
|
||||||
parent::__construct($nodes, [], $lineno, $tag);
|
parent::__construct($nodes, [], $lineno);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,7 +56,7 @@ class TwigTransTokenParser extends AbstractTokenParser {
|
||||||
|
|
||||||
$this->checkTransString($body, $lineno);
|
$this->checkTransString($body, $lineno);
|
||||||
|
|
||||||
$node = new TwigNodeTrans($body, $plural, $count, $options, $lineno, $this->getTag());
|
$node = new TwigNodeTrans($body, $plural, $count, $options, $lineno);
|
||||||
|
|
||||||
return $node;
|
return $node;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue