diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index f2040c8e24..7ea8e39553 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -348,12 +348,20 @@ class TextDescriptor extends Descriptor $argumentsInformation[] = sprintf('Service(%s)', (string) $argument); } elseif ($argument instanceof IteratorArgument) { $argumentsInformation[] = sprintf('Iterator (%d element(s))', \count($argument->getValues())); + foreach (array_map(function (Reference $value) {return (string) $value; }, $argument->getValues()) as $service) { + $argumentsInformation[] = sprintf('- %s', $service); + } } elseif ($argument instanceof ServiceLocatorArgument) { $argumentsInformation[] = sprintf('Service locator (%d element(s))', \count($argument->getValues())); } elseif ($argument instanceof Definition) { $argumentsInformation[] = 'Inlined Service'; } else { $argumentsInformation[] = \is_array($argument) ? sprintf('Array (%d element(s))', \count($argument)) : $argument; + if (\is_array($argument)) { + foreach (array_keys($argument) as $service) { + $argumentsInformation[] = sprintf('- %s', $service); + } + } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt index b73eeedad6..1551f96f57 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt @@ -17,6 +17,11 @@  %parameter%   Inlined Service   Array (3 element(s))  - Iterator (2 element(s)) - ---------------- ----------------------------- + - 0  + - 1  + - 2  + Iterator (2 element(s))  + - definition_1  + - .definition_2 + ---------------- -----------------------------