[DebugBundle] Added min_depth to Configuration

This enables calling the recently-added setMinDepth function on
VarCloner.
This commit is contained in:
James Johnston 2017-07-17 09:04:54 -07:00
parent 1e88b35380
commit 30cd70dcad
3 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,11 @@ class Configuration implements ConfigurationInterface
->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)

View File

@ -37,6 +37,7 @@ class DebugExtension extends Extension
$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']) {

View File

@ -8,6 +8,7 @@
<xsd:complexType name="config">
<xsd:attribute name="max-items" type="xsd:integer" />
<xsd:attribute name="min-depth" type="xsd:integer" />
<xsd:attribute name="max-string-length" type="xsd:integer" />
<xsd:attribute name="dump-destination" type="xsd:string" />
</xsd:complexType>