diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 0416d1e..6b21282 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -211,6 +211,11 @@ public function getTemplateClass($name, $index = NULL, $inline = FALSE) { /** * Renders a twig string directly. * + * Warning: You should use the render element 'twig_inline' together with + * the #template attribute instead of this method directly. + * On top of that you have to ensure that the template string is not dynamic + * but just an ordinary static php string. + * * @param string $template_string * The template string to render with placeholders. * @param array $context