-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Configuration] environment variables don't work on booleanNodes #26704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Correct, supporting this is a new feature that will ship in 4.1, see #23888 |
@nicolas-grekas any chance to backport this to 3.4? From user perspective it's looks like a bug, because environment variables not usable in symfony 3.4. Validation failed in many bundles: I18nRoutingBundle, SwarrotBundle, leaseweb/memcache-bundle, sentry, etc. |
Unfortunately the change is too heavy to be considered as a bug fix. |
should the documentation be fixed then ? https://symfony.com/doc/3.4/configuration/external_parameters.html#environment-variable-processors |
@mathieutu I don't know if I understand what exactly you want to see changed in the documentation. But since we have our own repository for the docs I suggest that you open an issue there. |
ping @mathroc 😅 |
@mathieutu ops sorry :) |
Is this really fixed in 4.1? I still encounter the issue with a clean install through Here is the commit adding a environment variable to enable/disable the web profiler toolbar. This fails with the following exception:
|
@nesk can you create a new issue for that? |
Yes! #29276 |
I tried to use environment variables for booleanNodes and get this exception:
In [BooleanNode.php](github symfony/symfony boolean node) line 29:
Invalid type for path "web_profiler.intercept_redirects". Expected boolean, but got string.
To reproduce the issue, I forked symfony demo and changed this:
https://github.com/sebastianblum/demo/commit/4df780b0fcfd593d3dbdac721f5ae32ae374367e
I extended the exception and the value was:
In BooleanNode.php line 29:
Invalid type for path "web_profiler.intercept_redirects". Expected boolean, but got string. Value was: %env(bool:APP_INTERCEPT_REDIRECTS)%
It looks like that the environment variables are not correct resolved for booleanNodes.
The text was updated successfully, but these errors were encountered: