[FrameworkBundle] Show injected services for Iterator and Array
This commit is contained in:
parent
90326e67d5
commit
db5fb200ce
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,11 @@
|
||||
[39;49m [39;49m[39;49m%parameter%[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49mInlined Service[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49mArray (3 element(s))[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49mIterator (2 element(s))
|
||||
---------------- -----------------------------
|
||||
[39;49m [39;49m[39;49m- 0[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49m- 1[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49m- 2[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49mIterator (2 element(s))[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m[39;49m- definition_1[39;49m[39;49m [39;49m
|
||||
[39;49m [39;49m- .definition_2
|
||||
---------------- -----------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user