8000 [Configuration] environment variables don't work on booleanNodes · Issue #26704 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
sebastianblum opened this issue Mar 29, 2018 · 10 comments
Closed

[Configuration] environment variables don't work on booleanNodes #26704

sebastianblum opened this issue Mar 29, 2018 · 10 comments

Comments

@sebastianblum
Copy link
Q A
Bug report? yes
Feature request? no
BC Break report? ?
RFC? no
Symfony version 4.0.6

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.

@nicolas-grekas
Copy link
Member

Correct, supporting this is a new feature that will ship in 4.1, see #23888

@damour
Copy link
Contributor
damour commented Mar 30, 2018

@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.

@nicolas-grekas
Copy link
Member

Unfortunately the change is too heavy to be considered as a bug fix.

@mathroc
Copy link
Contributor
mathroc commented Jun 19, 2018

@xabbuh
Copy link
Member
xabbuh commented Jun 19, 2018

@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.

@mathieutu
Copy link
Contributor
8000

ping @mathroc 😅

@xabbuh
Copy link
Member
xabbuh commented Jun 19, 2018

@mathieutu ops sorry :)

@nesk
Copy link
Contributor
nesk commented Nov 21, 2018

Is this really fixed in 4.1? I still encounter the issue with a clean install through composer create-project symfony/website-skeleton optional-env-demo.

Here is the commit adding a environment variable to enable/disable the web profiler toolbar. This fails with the following exception:

Environment variables "bool:WEB_PROFILER_TOOLBAR" are never used. Please, check your container's configuration.

@ro0NL
Copy link
Contributor
ro0NL commented Nov 21, 2018

@nesk can you create a new issue for that?

@nesk
Copy link
Contributor
nesk commented Nov 22, 2018

Yes! #29276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
0