Skip to content

Commit

Permalink
feature #23550 [DebugBundle] Added min_depth to Configuration (james-…
Browse files Browse the repository at this point in the history
…johnston-thumbtack)

This PR was merged into the 3.4 branch.

Discussion
----------

[DebugBundle] Added min_depth to Configuration

This enables calling the recently-added `setMinDepth` function on `VarCloner`.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#8185

Commits
-------

30cd70d [DebugBundle] Added min_depth to Configuration
  • Loading branch information
nicolas-grekas committed Jul 19, 2017
2 parents 5a521bf + 30cd70d commit 719465c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Expand Up @@ -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)
Expand Down
Expand Up @@ -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']) {
Expand Down
Expand Up @@ -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>
Expand Down

0 comments on commit 719465c

Please sign in to comment.