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

Adapter is undefined when reffered from env variable #231

Open
rgembalik opened this issue Dec 17, 2019 · 0 comments
Open

Adapter is undefined when reffered from env variable #231

rgembalik opened this issue Dec 17, 2019 · 0 comments
Assignees

Comments

@rgembalik
Copy link

rgembalik commented Dec 17, 2019

I am trying to configure a setup, where I can have several different installations, each allowing you to choose and configure adapter with the use of environmental variables.

However, when I pass a parameter that is an environmental variable, it is not being interpolated to the actual value.

The adapter in config is passed from a parameter, which is defined as such: '%env(UPLOAD_ADAPTER)%'.

But during cache:clear I get this error:

In KnpGaufretteExtension.php line 89:
The adapter '%env(UPLOAD_ADAPTER)%' is not defined.

All the other variables can be passed from the environmental variables. The adapter behind the env variable is defined. If I pass it directly to parameters in services.yaml it works. Originally I tried it with a '%env(default:default_adapter:UPLOAD_ADAPTER)%' notation, but that didn't work either.

Any ideas? I would be fine with any solution that lets me have default filesystem adapter and override it with e.g. S3 or Azure Blob adapter when there are certain variables defined.

EDIT: I am using bundle version 0.6.0, Symfony 4.4.1, tested with php 7.2, 7.3 and 7.4.

@PedroTroller PedroTroller self-assigned this Apr 5, 2023
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

2 participants