shopware5 / SwagMediaS3

MIT License
22 stars 17 forks source link

Migration fails because of OptionResolver but config is set #25

Open sydetion opened 5 years ago

sydetion commented 5 years ago

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]
shyim commented 5 years ago

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

sydetion commented 5 years ago

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 commented 5 years ago

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