diff --git a/StorageBundle/DependencyInjection/Configuration.php b/StorageBundle/DependencyInjection/Configuration.php index 58d063c..5d083cb 100644 --- a/StorageBundle/DependencyInjection/Configuration.php +++ b/StorageBundle/DependencyInjection/Configuration.php @@ -16,7 +16,17 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); - $treeBuilder->root('storage'); + $root = $treeBuilder->root('storage'); + $root->children() + ->arrayNode('storage_name') + ->children() + ->scalarNode('type')->end() + ->children() + ->scalarNode('bucket')->end() + ->children() + ->scalarNode('region')->end() + ->children() + ->scalarNode('endpoint')->end(); return ($treeBuilder); } } diff --git a/StorageBundle/Storage.php b/StorageBundle/Storage.php index 2e38f0b..13fe24c 100644 --- a/StorageBundle/Storage.php +++ b/StorageBundle/Storage.php @@ -26,15 +26,15 @@ class Storage //storage: //photos: -//type: s3 -// bucket: bluesquare.public -// region: nl-ams -// endpoint: 'https://s3.nl-ams.scw.cloud' -// credentials: -// key: '%env(MYSUPERSECRETAWSKEY)%' -// secret: '%env(MYSUPERSECRETAWSSECRET)%' -// version: lastest # optionnel -// path: '/photos' # optionnel +// type: s3 +// bucket: bluesquare.public +// region: nl-ams +// endpoint: 'https://s3.nl-ams.scw.cloud' +// credentials: +// key: '%env(MYSUPERSECRETAWSKEY)%' +// secret: '%env(MYSUPERSECRETAWSSECRET)%' +// version: lastest # optionnel +// path: '/photos' # optionnel // // files: // type: s3