Closed Bukashk0zzz closed 1 year ago
@Bukashk0zzz did you try to use a parameter ?
parameters:
flysystem_adapter: '%env(UPLOADS_PUBLIC_FLYSYSTEM_ADAPTER)%' <---
oneup_flysystem:
adapters:
s3_public:
awss3v3:
client: aws.s3.client
bucket: '%aws.s3.cdn.bucket%'
prefix: '%env(UPLOADS_PUBLIC_PATH)%'
filesystems:
uploads_public:
adapter: '%flysystem_adapter%' <---
mount: uploads_public
visibility: public
disable_asserts: false`
Yes, I changed all to parameters already, but this workaround not solution for this issue.
I have the same story:
current:
adapter: '%env(FILESYSTEM_ADAPTER)%'
The adapter '%env(FILESYSTEM_ADAPTER)%' is not defined.
I tired to use the workaround but I am still getting the problem. Would you be able to explain how does this workaround fix that issues? Does the parameters get process before rest of the config?
I am using symfony 4.0
@lisfox1 , I've just separate adapter conf files: project/app/config/config_dev.yml
oneup_flysystem:
filesystems:
current:
adapter: 'dev_adapter'
project/app/config/config_prod.yml
oneup_flysystem:
filesystems:
current:
adapter: 's3_adapter'
I'm not sure that sf4 is used same config approach
I get the same error. Did anyone find a solution to get this working with environments instead of separate configuration files?
I had similar issue with my config due to use %kernel.project_dir% route in my .env file. I solved with resolve env var processor: https://symfony.com/doc/current/configuration/env_var_processors.html
keyFilePath: '%env(resolve:GOOGLE_STORAGE_CLIENT_KEY)%'
Maybe it helps you
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
I use new Dotenv symfony component. I can't define adapter name using env parameter.
Get error [LogicException] The adapter 'env_UPLOADS_PUBLIC_FLYSYSTEM_ADAPTER_e4fc4c42495a301a782e1f2d4704048f' is not defined.
My config: