1up-lab / OneupFlysystemBundle

A Flysystem integration for your Symfony projects.
MIT License
630 stars 119 forks source link

supports env variables in configuration #277

Closed alexandre-le-borgne closed 1 year ago

alexandre-le-borgne commented 1 year ago

Usage:

oneup_flysystem.yaml

oneup_flysystem:
    adapters:
        local:
            local:
                location: '%app.uploads.dir%'
                permissions:
                    file:
                        public: 0o644
                        private: 0o600
                    dir:
                        public: 0o755
                        private: 0o700
        ovh:
            awss3v3:
                client: app.ovh_s3_client
                bucket: '%app.ovh_s3_client.bucket%'
                prefix: '%app.ovh_s3_client.prefix%'

    filesystems:
        uploads:
            adapter: '%app.filesystem_uploads.adapter%'
            visibility: private
            directory_visibility: private

services.yaml

    app.filesystem_uploads.adapter: '%env(FILESYSTEM_UPLOAD_ADAPTER)%'

Without the fix:

Incompatible use of dynamic environment variables "FILESYSTEM_UPLOAD_ADAPTER" found in parameters.

alexandre-le-borgne commented 1 year ago

The remarks on the code (coding style) do not concern the modification

rdavaillaud commented 1 year ago

Hello, what's up with this one? Is there something blocking the merge, maybe just a rebase ?

bytehead commented 1 year ago

@rdavaillaud I'll have a look this week!

bytehead commented 1 year ago

Thank you @alexandre-le-borgne!