diff --git a/StorageBundle/Adaptors/S3Storage.php b/StorageBundle/Adaptors/S3Storage.php index b369a55..9f48b61 100644 --- a/StorageBundle/Adaptors/S3Storage.php +++ b/StorageBundle/Adaptors/S3Storage.php @@ -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'], diff --git a/StorageBundle/DependencyInjection/Configuration.php b/StorageBundle/DependencyInjection/Configuration.php index 22db9e0..4b1e7e4 100644 --- a/StorageBundle/DependencyInjection/Configuration.php +++ b/StorageBundle/DependencyInjection/Configuration.php @@ -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()