From 16c86688de46020954e0f9562fd6a0be2f0a54b7 Mon Sep 17 00:00:00 2001 From: Emmanuel Vella Date: Mon, 29 Jul 2013 10:47:17 +0200 Subject: [PATCH] Update pushover user configuration This is related to https://github.com/Seldaek/monolog/commit/46cedf5e2f0553d32037fe6e275bff8aec0bb5f3. Using an array of users will need version 1.6+ of monolog. --- DependencyInjection/Configuration.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 332222be..47b224f2 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -69,7 +69,14 @@ public function getConfigTreeBuilder() ->scalarNode('buffer_size')->defaultValue(0)->end() // fingers_crossed and buffer ->scalarNode('handler')->end() // fingers_crossed and buffer ->scalarNode('token')->end() // pushover - ->scalarNode('user')->end() // pushover + ->variableNode('user') // pushover + ->validate() + ->ifTrue(function($v) { + return !is_string($v) && !is_array($v); + }) + ->thenInvalid('User must be a string or an array.') + ->end() + ->end() ->scalarNode('title')->defaultNull()->end() // pushover ->arrayNode('publisher') ->canBeUnset()