diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index c108503..63eccc7 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -24,9 +24,15 @@ public function getConfigTreeBuilder() $root ->children() - ->scalarNode('to') + ->arrayNode('to') + ->beforeNormalization() + ->ifString() + ->then(function($value) { return array($value); }) + ->end() ->isRequired() ->cannotBeEmpty() + ->prototype('scalar') + ->end() ->end() ->scalarNode('from') ->isRequired()