Open
Description
Symfony version(s) affected
7.1.8
Description
I am trying to add a parameter to the config yaml like this
parameters:
string_format: my friend %%s has %%d dogs
However, when I try to autowire it to a class that implements Twig\Extension\GlobalsInterface; I receive the following error
You have requested a non-existent parameter "s has ".
How to reproduce
I set this parameter in yaml
parameters:
string_format: my friend %%s has %%d dogs
I autowire it in a constructor for a class implementing Twig\Extension\GlobalsInterface;
public function __construct( #[Autowire('%string_format%')] private readonly string $stringFormat]{}
Stack trace is pointing to
App_KernelDevDebugContainer.php
$instance->addExtension(new \App\Twig\TwigExtension('my friend '.$container->getParameter('s has ').'d dogs'));
Possible Solution
No response
Additional Context
No response