When a template is "not found" and we are using the string loader in the Twig loader chain, instead of a useful error/exception you will just see the name of the template you called on screen.
Supplementary to that concern:
Newer versions of Twig say this about the Twig_Extension_StringLoader class:
This loader should only be used for unit testing as it has many limitations (for instance, the include or extends tag does not make any sense for a string loader).
The main reason this was added was to support inline templating:, see also .
However it very likely presents some issues the way we are currently using it, some of which are highlighted in this upstream issue: https://github.com/symfony/symfony/issues/10865
Discuss how we can factor out the string loader from the loader chain or be smarter about how we use it in the chain.
User interface changes