Skip to content

Commit 30cd70d

Browse files
[DebugBundle] Added min_depth to Configuration
This enables calling the recently-added setMinDepth function on VarCloner.
1 parent 1e88b35 commit 30cd70d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public function getConfigTreeBuilder()
3636
->min(-1)
3737
->defaultValue(2500)
3838
->end()
39+
->integerNode('min_depth')
40+
->info('Minimum tree depth to clone all the items, 1 is default')
41+
->min(0)
42+
->defaultValue(1)
43+
->end()
3944
->integerNode('max_string_length')
4045
->info('Max length of displayed strings, -1 means no limit')
4146
->min(-1)

src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function load(array $configs, ContainerBuilder $container)
3737

3838
$container->getDefinition('var_dumper.cloner')
3939
->addMethodCall('setMaxItems', array($config['max_items']))
40+
->addMethodCall('setMinDepth', array($config['min_depth']))
4041
->addMethodCall('setMaxString', array($config['max_string_length']));
4142

4243
if (null !== $config['dump_destination']) {

src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<xsd:complexType name="config">
1010
<xsd:attribute name="max-items" type="xsd:integer" />
11+
<xsd:attribute name="min-depth" type="xsd:integer" />
1112
<xsd:attribute name="max-string-length" type="xsd:integer" />
1213
<xsd:attribute name="dump-destination" type="xsd:string" />
1314
</xsd:complexType>

0 commit comments

Comments
 (0)