OneupFlysystemBundle icon indicating copy to clipboard operation
OneupFlysystemBundle copied to clipboard

Rearrange the options array

Open yellow1912 opened this issue 10 years ago • 1 comments

Right now we are configuring the system like this:

filesystems:
        s3_lib:
            adapter: s3_lib
            visibility: public
            cache: local

Then in the DI Extension we have to check manually:

$options = [];
        if (array_key_exists('visibility', $config)) {
            $options['visibility'] = $config['visibility'];
        }

This will get troublesome later when new options are available etc. I suggest we change it to this:

filesystems:
        s3_lib:
            adapter: s3_lib
            options:
                visibility: public
            cache: local

We can then easily use $config['options'] array in our DI Extension.

yellow1912 avatar Feb 04 '15 06:02 yellow1912

Indeed. visibility seems to be given to the filesystem as an element in an option array, so this definitely makes sense to me.

sheeep avatar Feb 04 '15 08:02 sheeep