From d473e5fbdda6e97685aa04f93c742e607d8e821f Mon Sep 17 00:00:00 2001 From: Phansys Date: Tue, 21 Aug 2012 08:56:20 -0300 Subject: [PATCH 1/2] Allowed array of emails for "to_email" parameter. --- DependencyInjection/Configuration.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 57a0420c..9d0147a6 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -92,7 +92,13 @@ public function getConfigTreeBuilder() ->prototype('scalar')->end() ->end() ->scalarNode('from_email')->end() // swift_mailer and native_mailer - ->scalarNode('to_email')->end() // swift_mailer and native_mailer + ->arrayNode('to_email') // swift_mailer and native_mailer + ->prototype('scalar')->end() + ->beforeNormalization() + ->ifString() + ->then(function($v) { return array('id' => $v); }) + ->end() + ->end() ->scalarNode('subject')->end() // swift_mailer and native_mailer ->arrayNode('email_prototype') // swift_mailer ->canBeUnset() From 186d5e80d73a3c4f6209e11e9503cff2c379d321 Mon Sep 17 00:00:00 2001 From: Phansys Date: Tue, 21 Aug 2012 10:11:08 -0300 Subject: [PATCH 2/2] Removed obsolete array key "id" on "to_email" configuration parameter parsing. --- DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 9d0147a6..bb74fdbe 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -96,7 +96,7 @@ public function getConfigTreeBuilder() ->prototype('scalar')->end() ->beforeNormalization() ->ifString() - ->then(function($v) { return array('id' => $v); }) + ->then(function($v) { return array($v); }) ->end() ->end() ->scalarNode('subject')->end() // swift_mailer and native_mailer