Skip to content

Commit d6d9508

Browse files
nykopolfabpot
authored andcommitted
debug service with one line by tag
1 parent 4d6aa60 commit d6d9508

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

Console/Descriptor/TextDescriptor.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
254254

255255
$tags = $definition->getTags();
256256
if (count($tags)) {
257-
$tagInformation = '';
257+
$tagInformation = array();
258258
foreach ($tags as $tagName => $tagData) {
259259
foreach ($tagData as $tagParameters) {
260260
$parameters = array_map(function ($key, $value) {
@@ -263,12 +263,13 @@ protected function describeContainerDefinition(Definition $definition, array $op
263263
$parameters = implode(', ', $parameters);
264264

265265
if ('' === $parameters) {
266-
$tagInformation .= sprintf('%s', $tagName);
266+
$tagInformation[] = sprintf('%s', $tagName);
267267
} else {
268-
$tagInformation .= sprintf('%s (%s)', $tagName, $parameters);
268+
$tagInformation[] = sprintf('%s (%s)', $tagName, $parameters);
269269
}
270270
}
271271
}
272+
$tagInformation = implode("\n", $tagInformation);
272273
} else {
273274
$tagInformation = '-';
274275
}
Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
------------------ -------------------------------------------------------
2-
 Option   Value 
3-
------------------ -------------------------------------------------------
4-
Service ID -
5-
Class Full\Qualified\Class2
6-
Tags tag1 (attr1: val1, attr2: val2)tag1 (attr3: val3)tag2
7-
Calls setMailer
8-
Public no
9-
Synthetic yes
10-
Lazy no
11-
Shared yes
12-
Abstract no
13-
Autowired no
14-
Autowiring Types -
15-
Required File /path/to/file
16-
Factory Service factory.service
17-
Factory Method get
18-
------------------ -------------------------------------------------------
1+
------------------ ---------------------------------
2+
 Option   Value 
3+
------------------ ---------------------------------
4+
Service ID -
5+
Class Full\Qualified\Class2
6+
Tags tag1 (attr1: val1, attr2: val2)
7+
tag1 (attr3: val3)
8+
tag2
9+
Calls setMailer
10+
Public no
11+
Synthetic yes
12+
Lazy no
13+
Shared yes
14+
Abstract no
15+
Autowired no
16+
Autowiring Types -
17+
Required File /path/to/file
18+
Factory Service factory.service
19+
Factory Method get
20+
------------------ ---------------------------------
1921

0 commit comments

Comments
 (0)