From 30cd70dcad190e3ad13a8b301d95cbcdcccb0400 Mon Sep 17 00:00:00 2001 From: James Johnston Date: Mon, 17 Jul 2017 09:04:54 -0700 Subject: [PATCH] [DebugBundle] Added min_depth to Configuration This enables calling the recently-added setMinDepth function on VarCloner. --- .../Bundle/DebugBundle/DependencyInjection/Configuration.php | 5 +++++ .../DebugBundle/DependencyInjection/DebugExtension.php | 1 + .../Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd | 1 + 3 files changed, 7 insertions(+) diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php index 5761e62a72e1a..4af24cd488393 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php @@ -36,6 +36,11 @@ public function getConfigTreeBuilder() ->min(-1) ->defaultValue(2500) ->end() + ->integerNode('min_depth') + ->info('Minimum tree depth to clone all the items, 1 is default') + ->min(0) + ->defaultValue(1) + ->end() ->integerNode('max_string_length') ->info('Max length of displayed strings, -1 means no limit') ->min(-1) diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php index ce6d1b7c677e4..835d823664021 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php @@ -37,6 +37,7 @@ public function load(array $configs, ContainerBuilder $container) $container->getDefinition('var_dumper.cloner') ->addMethodCall('setMaxItems', array($config['max_items'])) + ->addMethodCall('setMinDepth', array($config['min_depth'])) ->addMethodCall('setMaxString', array($config['max_string_length'])); if (null !== $config['dump_destination']) { diff --git a/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd b/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd index a582ff8b2b70f..32306886020bf 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd +++ b/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd @@ -8,6 +8,7 @@ +