Created
November 6, 2020 12:13
-
-
Save arosenhagen/c2965bd4e4347b93f19fd5614ba9c276 to your computer and use it in GitHub Desktop.
[PATCH] Shopware - Allow definition of strategy in media adapter (allow migrating back to plain strategy)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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