mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-11 06:15:43 +00:00
Avoid polluting ModuleNode::toString() with embedded templates
This commit is contained in:
@@ -38,6 +38,11 @@ final class ModuleNode extends Node
|
||||
if (!$body instanceof BodyNode) {
|
||||
trigger_deprecation('twig/twig', '3.12', \sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated.', BodyNode::class, static::class));
|
||||
}
|
||||
if (!$embeddedTemplates instanceof Node) {
|
||||
trigger_deprecation('twig/twig', '3.21', \sprintf('Not passing a "%s" instance as the "embedded_templates" argument of the "%s" constructor is deprecated.', Node::class, static::class));
|
||||
|
||||
$embeddedTemplates = new Nodes($embeddedTemplates);
|
||||
}
|
||||
|
||||
$nodes = [
|
||||
'body' => $body,
|
||||
|
||||
Reference in New Issue
Block a user