-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.3.x-dev
Description
as per conversation with @nicolas-grekas here #48705 (comment) and possibly related to #48705
Using the reproducer, which has a .env with MY_EXAMPLE_ENV=
when clearing cache (clearing cache in enough in the reproducer to reproduce the issue, but in a live app loading any webpage also crashes with same message)
Note the reproducer is creating a parameter from the env var and then twig is consuming that parameter to create global variables.
IT IS THIS CONSUMPTION by twig that generates the issue, without /config/twig.php trying to set a global from the parameter, the problem doesn't happen
How to reproduce
Here is a reproducer
This was created with
- composer create-project symfony/skeleton bug_app_env
- cd bug_app_env
- change composer.json to be 6.3
- composer req twig
- add config/example.php to create a parameter
- add config/twig.php to consume that parameter
to replicate the bug then run php bin/console cache:clear
Possible Solution
No response
Additional Context
to be clear, debug:dotenv
correctly loads and gives