1up-lab / OneupFlysystemBundle

A Flysystem integration for your Symfony projects.
MIT License
634 stars 118 forks source link

Error on version config in AWS adapter #148

Closed davidromani closed 7 years ago

davidromani commented 7 years ago

Hello.

I'm following this instructions but I'm always getting this profiler error response:

InvalidArgumentException in ClientResolver.php line 374:
Missing required client configuration options: 

version: (string)

A "version" configuration value is required. Specifying a version constraint
ensures that your code will not be affected by a breaking change made to the
service. For example, when using Amazon S3, you can lock your API version to
"2006-03-01".

Your build of the SDK has the following version(s) of "s3": * "2006-03-01"

You may provide "latest" to the "version" configuration value to utilize the
most recent available API version that your client's API provider can find.
Note: Using 'latest' in a production application is not recommended.

A list of available API versions can be found on each client's API documentation
page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are
unable to load a specific API version, then you may need to update your copy of
the SDK.

My config files are:

# services.yml
    app.aws_s3.client:
        class: Aws\S3\S3Client
        arguments:
            -
                version: "2006-03-01"
                region:  "%amazon_s3_region%"
                credentials:
                    key:    "%amazon_s3_acces_key%"
                    secret: "%amazon_s3_secret_key%"

# config.yml
oneup_flysystem:
    adapters:
        my_adapter:
            local:
                directory: "%kernel.root_dir%../web/media/uploads"
        s3_adapter:
            awss3v3:
                client: app.aws_s3.client
                bucket: "%amazon_s3_bucket_name%"
                prefix: ~
    filesystems:
        my_filesystem:
            adapter: my_adapter

Anybody can help me? Thanks.

bytehead commented 7 years ago

Which version of OneupFlySystem do you use? And which one of AwsS3v3?

davidromani commented 7 years ago

@bytehead my composer.json def is:

    "require": {
        "league/flysystem-aws-s3-v3": "^1.0",
        "oneup/flysystem-bundle": "^1.0",

(and other symfony bundles)

Detailed info here:

$ composer show oneup/flysystem-bundle
name     : oneup/flysystem-bundle
descrip. : Integrates Flysystem filesystem abstraction library to your Symfony2 project.
keywords : Flysystem, Symfony2, abstraction, filesystem
versions : * 1.14.0
type     : symfony-bundle
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/1up-lab/OneupFlysystemBundle.git 1224bd9f50b5c655fea312a10f624d029768d3ff
dist     : [zip] https://api.github.com/repos/1up-lab/OneupFlysystemBundle/zipball/1224bd9f50b5c655fea312a10f624d029768d3ff 1224bd9f50b5c655fea312a10f624d029768d3ff
names    : oneup/flysystem-bundle

autoload
psr-4
Oneup\FlysystemBundle\ => .

requires
league/flysystem ^1.0.26
php >=5.4.0
symfony/framework-bundle ~2.0|~3.0

$ composer show league/flysystem-aws-s3-v3
name     : league/flysystem-aws-s3-v3
descrip. : Flysystem adapter for the AWS S3 SDK v3.x
keywords : 
versions : * 1.0.18
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/thephpleague/flysystem-aws-s3-v3.git dc09b19f455750663b922ed52dcc0ff215bed284
dist     : [zip] https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/dc09b19f455750663b922ed52dcc0ff215bed284 dc09b19f455750663b922ed52dcc0ff215bed284
names    : league/flysystem-aws-s3-v3

autoload
psr-4
League\Flysystem\AwsS3v3\ => src/

requires
aws/aws-sdk-php ^3.0.0
league/flysystem ^1.0.40
php >=5.5.0
davidromani commented 7 years ago

solved, it was a problem on another part, my apologies

bytehead commented 7 years ago

No worries, didn't find time to test...