GuafretteBundle with Aws SDK2



我正试图将Gaufrette与Aws SDK2一起使用,但在缓存中出现以下错误:配置后清除:

[AwsCommonExceptionInvalidArgumentException]                          
The provided signature value is not an instance of S3SignatureInterface                                                                        

这是我的设置。

composer.json

   "aws/aws-sdk-php": "2.6.*@dev" 

配置yml

services:
  src.aws_s3.client:
    class: AwsS3S3Client
    factory_class: AwsS3S3Client
    factory_method: 'factory'
    arguments:
      key: %amazon_aws_key%
      secret: %amazon_aws_secret_key%
      region: US Standard
...
knp_gaufrette:
    adapters:
        media_adapter:
            aws_s3:
              service_id: 'src.aws_s3.client'
              bucket_name: my.bucket
              options:
                directory: 'media'

GitHub:https://github.com/KnpLabs/KnpGaufretteBundle/issues/90

问题是服务声明的参数中的错误(我本应该看到)。它需要像这样的集合:

配置yml

services:
  src.aws_s3.client:
    class: AwsS3S3Client
    factory_class: AwsS3S3Client
    factory_method: 'factory'
    arguments:
      - key: %amazon_aws_key%
        secret: %amazon_aws_secret_key%

相关内容

  • 没有找到相关文章