diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 6b21282..f0a8050 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -214,7 +214,11 @@ public function getTemplateClass($name, $index = NULL, $inline = FALSE) { * 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. + * but just an ordinary static php string, because there may be installations + * using read-only PHPStorage that want to generate all possible twig + * templates as part of a build step. So it is important that an automated + * script can find the templates and extract them. This is only possible if + * the template is a regular string. * * @param string $template_string * The template string to render with placeholders.