Closed daninr closed 3 years ago
Hi, I just tested with a new fresh Symfony 4.4 installation and I have no errors.
template_from_string function with StringLoaderExtension don't seem to be by default in symfony :
https://twig.symfony.com/doc/2.x/functions/template_from_string.html https://symfony.com/doc/4.4/reference/twig_reference.html
Hi @artgris thanks for you fast reply.
It is loaded with twig: https://twig.symfony.com/doc/3.x/api.html
If I remove:
Twig\Extension\StringLoaderExtension: ~
on your services.yml then it's working.
but it is not loaded by default:
https://twig.symfony.com/doc/3.x/functions/template_from_string.html : The template_from_string function is not available by default. You must add the \Twig\Extension\StringLoaderExtension extension explicitly when creating your Twig environment
you probably already have a declaration (override/extend) of this extension, in your project, for example:
app.extension:
class: Twig\Extension\StringLoaderExtension
tags:
- { name: 'twig.extension' }
and should be removed or replace by:
Twig\Extension\StringLoaderExtension: ~
Hi,
I updated from Symfony 4.2 to 4.4 and now I can't get working this bundle because since Symfony 4.3 Twig\Extension\StringLoaderExtension is loaded by default.
This is the error I am getting:
Could you remove it from services.yml file?