SwagMediaS3 icon indicating copy to clipboard operation
SwagMediaS3 copied to clipboard

Migration fails because of OptionResolver but config is set

Open sydetion opened this issue 6 years ago • 3 comments

Config file is set according to README

<?php return array (
  'db' => 
  array (
    'host' => 'localhost',
    'port' => '3306',
    'username' => 'staging',
    'password' => 'secure',
    'dbname' => 'somedb',
  ),
  'cdn' => [
    'backend' => 's3',
    'adapters' => [
      's3' => [
        'type' => 's3',
        'mediaUrl' => 'https://cdn.someurl.com/',
        'key' => 'some KEY',
        'secret' => 'some SECRET',
        'region' => 'eu-central-1',
        'bucket' => 'bucket-name',
        'prefix' => ''
      ]
    ]
  ],
);

but migration returns

bin/console sw:media:migrate --from=local --to=s3

In OptionsResolver.php line 645:

  The options "key", "prefix", "secret" do not exist. Defined options are: "bucket", "credentials", "endpoint",
  "mediaUrl", "region", "root", "type", "url", "version".


sw:media:migrate [--from [FROM]] [--to [TO]] [--skip-scan]

sydetion avatar Feb 17 '19 20:02 sydetion

Its miss configured, that's the reason why you got this message. You are using the Core Integration of S3, which is since Shopware 5.5. This Plugin is not required.

See example configuration https://github.com/shopware/shopware/blob/5.5/engine/Shopware/Configs/Default.php#L97

shyim avatar Feb 17 '19 20:02 shyim

okay, what a mess, just got the link from https://developers.shopware.com/developers-guide/shopware-5-media-service/ which seems outdated.

@maintainers Please add this information to the docs or this plugins description - is there any further documentation on the core integration of S3?

sydetion avatar Feb 17 '19 20:02 sydetion

just FYI if you're having struggle using Core Integration of S3 / CloudFront in Shopware causing error 403: https://issues.shopware.com/issues/SW-23526

sydetion avatar Feb 18 '19 01:02 sydetion