Skip to content

Commit

Permalink
[DI] Removes number of elements information in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaedl committed May 3, 2019
1 parent 15e9eec commit 79ebf28
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -17,6 +17,7 @@
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
Expand Down Expand Up @@ -339,7 +340,11 @@ protected function describeContainerDefinition(Definition $definition, array $op
if ($argument instanceof Reference) {
$argumentsInformation[] = sprintf('Service(%s)', (string) $argument);
} elseif ($argument instanceof IteratorArgument) {
$argumentsInformation[] = sprintf('Iterator (%d element(s))', \count($argument->getValues()));
if ($argument instanceof TaggedIteratorArgument) {
$argumentsInformation[] = sprintf('Tagged Iterator for "%s"', $argument->getTag());
} else {
$argumentsInformation[] = empty($argument->getValues()) ? 'Iterator' : sprintf('Iterator (%d element(s))', \count($argument->getValues()));
}
} elseif ($argument instanceof Definition) {
$argumentsInformation[] = 'Inlined Service';
} else {
Expand Down

0 comments on commit 79ebf28

Please sign in to comment.