This commit is contained in:
Cyprian Beauvois 2019-02-20 12:44:23 +01:00
parent febdb7cfb5
commit 2c325f64ed
2 changed files with 7 additions and 9 deletions

View File

@ -25,8 +25,6 @@ class S3Storage
$this->config = $config; $this->config = $config;
$this->bucket = $config['bucket']; $this->bucket = $config['bucket'];
dump($this); die;
$this->client = new S3Client([ $this->client = new S3Client([
'version' => isset($config['version']) ? $config['version'] : 'latest', 'version' => isset($config['version']) ? $config['version'] : 'latest',
'region' => $config['region'], 'region' => $config['region'],

View File

@ -20,14 +20,14 @@ class Configuration implements ConfigurationInterface
$root->useAttributeAsKey('storage_name') $root->useAttributeAsKey('storage_name')
->prototype('array') ->prototype('array')
->children() ->children()
->scalarNode('type')->end() ->scalarNode('type')->isRequired()->cannotBeEmpty()->end()
->scalarNode('bucket')->end() ->scalarNode('bucket')->isRequired()->cannotBeEmpty()->end()
->scalarNode('region')->end() ->scalarNode('region')->isRequired()->cannotBeEmpty()->end()
->scalarNode('endpoint')->end() ->scalarNode('endpoint')->isRequired()->cannotBeEmpty()->end()
->arrayNode('credentials') ->arrayNode('credentials')->isRequired()->cannotBeEmpty()
->children() ->children()
->scalarNode('key')->end() ->scalarNode('key')->isRequired()->cannotBeEmpty()->end()
->scalarNode('secret')->end() ->scalarNode('secret')->isRequired()->cannotBeEmpty()->end()
->end() ->end()
->end() ->end()
->scalarNode('version')->end() ->scalarNode('version')->end()