Skip to content

Commit

Permalink
Use requiresAtLeastOneElement on array nodes
Browse files Browse the repository at this point in the history
Using `cannotBeEmpty` on array nodes is deprecated on Symony 3.4.
  • Loading branch information
emodric authored Nov 20, 2017
1 parent a6c07bb commit 2fdfabf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public function getConfigTreeBuilder()
->arrayNode('mappings')
->info('Configure mappings between mime-type and content type identifier')
->isRequired()
->cannotBeEmpty()
->requiresAtLeastOneElement()
->prototype('array')
->children()
->arrayNode('mime_types')
->isRequired()
->cannotBeEmpty()
->requiresAtLeastOneElement()
->prototype('scalar')->end()
->end()
->scalarNode('content_type_identifier')
Expand All @@ -99,7 +99,7 @@ public function getConfigTreeBuilder()
->children()
->arrayNode('mime_types')
->isRequired()
->cannotBeEmpty()
->requiresAtLeastOneElement()
->prototype('scalar')->end()
->end()
->scalarNode('content_type_identifier')
Expand Down

0 comments on commit 2fdfabf

Please sign in to comment.