Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[PATCH] Shopware - Allow definition of strategy in media adapter (allow migrating back to plain strategy)
diff --git a/engine/Shopware/Bundle/MediaBundle/Adapters/LocalAdapterFactory.php b/engine/Shopware/Bundle/MediaBundle/Adapters/LocalAdapterFactory.php
index b7c02b3a28..f93b4eeab3 100644
--- a/engine/Shopware/Bundle/MediaBundle/Adapters/LocalAdapterFactory.php
+++ b/engine/Shopware/Bundle/MediaBundle/Adapters/LocalAdapterFactory.php
@@ -65,11 +65,12 @@ class LocalAdapterFactory implements AdapterFactoryInterface
$options = new OptionsResolver();
$options->setRequired(['root']);
- $options->setDefined(['file', 'dir', 'mediaUrl', 'type', 'permissions', 'url']);
+ $options->setDefined(['strategy', 'file', 'dir', 'mediaUrl', 'type', 'permissions', 'url']);
$options->setAllowedTypes('root', 'string');
$options->setAllowedTypes('file', 'array');
$options->setAllowedTypes('dir', 'array');
+ $options->setAllowedTypes('strategy', 'string');
$options->setAllowedTypes('mediaUrl', 'string');
$options->setAllowedTypes('type', 'string');
$options->setAllowedTypes('permissions', 'array');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment