From bb77cf15b78084bae461439de587042ec397a297 Mon Sep 17 00:00:00 2001 From: binarious Date: Mon, 15 May 2017 13:18:06 +0200 Subject: [PATCH] feat(Configuration.php): make from an array node --- DependencyInjection/Configuration.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d3b769c..eff4339 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -43,9 +43,17 @@ public function getConfigTreeBuilder() ->prototype('scalar') ->end() ->end() - ->scalarNode('from') + ->arrayNode('from') + ->beforeNormalization() + ->ifString() + ->then(function ($value) { + return array($value); + }) + ->end() ->isRequired() ->cannotBeEmpty() + ->prototype('scalar') + ->end() ->end() ->booleanNode('handle404') ->defaultValue(false)