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->bucket = $config['bucket'];
dump($this); die;
$this->client = new S3Client([
'version' => isset($config['version']) ? $config['version'] : 'latest',
'region' => $config['region'],

View File

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