Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Update config to take both string and array
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhilles committed Sep 4, 2014
1 parent 0979732 commit 8fabd42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ public function getConfigTreeBuilder()
$root
->children()
->arrayNode('to')
->beforeNormalization()
->ifString()
->then(function($value) { return array($value); })
->end()
->isRequired()
->cannotBeEmpty()
->prototype('scalar')
->end()
->end()
->scalarNode('from')
->isRequired()
Expand Down

0 comments on commit 8fabd42

Please sign in to comment.