Skip to content
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

Add support for environment variables #28

Open
qzminski opened this issue May 20, 2020 · 0 comments
Open

Add support for environment variables #28

qzminski opened this issue May 20, 2020 · 0 comments

Comments

@qzminski
Copy link

Given this configuration:

accelerator_cache:
    host: "%env(ACCELERATOR_CACHE_HOST)%"
    web_dir: "%kernel.root_dir%/../web"

and this .env file:

ACCELERATOR_CACHE_HOST=https://www.domain.tld

The command will not work because it will try to fetch the http://https://www.domain.tld/apc-*.php URL. Actual problem lies here:

https://github.com/Smart-Core/AcceleratorCacheBundle/blob/master/DependencyInjection/Configuration.php#L23

The moment a bundle configuration is processed, the $v does not yet contain the environment variable value (i.e. https://www.domain.tld), but rather a variable temporary name (e.g. env_dc3b1098b7dfc6db_ACCELERATOR_CACHE_HOST_93ccaa97cef7fc766f177ccffea2b95b), thus always receiving the http:// prefix.

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

Successfully merging a pull request may close this issue.

1 participant