@@ -224,8 +224,10 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
224
224
225
225
$ tableHeaders = array_merge (array ('Service ID ' ), $ tagsNames , array ('Class name ' ));
226
226
$ tableRows = array ();
227
+ $ rawOutput = isset ($ options ['raw_output ' ]) && $ options ['raw_output ' ];
227
228
foreach ($ this ->sortServiceIds ($ serviceIds ) as $ serviceId ) {
228
229
$ definition = $ this ->resolveServiceDefinition ($ builder , $ serviceId );
230
+ $ styledServiceId = $ rawOutput ? $ serviceId : sprintf ('<fg=cyan>%s</fg=cyan> ' , $ serviceId );
229
231
if ($ definition instanceof Definition) {
230
232
if ($ showTag ) {
231
233
foreach ($ definition ->getTag ($ showTag ) as $ key => $ tag ) {
@@ -240,13 +242,13 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
240
242
}
241
243
}
242
244
} else {
243
- $ tableRows [] = array ($ serviceId , $ definition ->getClass ());
245
+ $ tableRows [] = array ($ styledServiceId , $ definition ->getClass ());
244
246
}
245
247
} elseif ($ definition instanceof Alias) {
246
248
$ alias = $ definition ;
247
- $ tableRows [] = array_merge (array ($ serviceId , sprintf ('alias for "%s" ' , $ alias )), $ tagsCount ? array_fill (0 , $ tagsCount , '' ) : array ());
249
+ $ tableRows [] = array_merge (array ($ styledServiceId , sprintf ('alias for "%s" ' , $ alias )), $ tagsCount ? array_fill (0 , $ tagsCount , '' ) : array ());
248
250
} else {
249
- $ tableRows [] = array_merge (array ($ serviceId , get_class ($ definition )), $ tagsCount ? array_fill (0 , $ tagsCount , '' ) : array ());
251
+ $ tableRows [] = array_merge (array ($ styledServiceId , get_class ($ definition )), $ tagsCount ? array_fill (0 , $ tagsCount , '' ) : array ());
250
252
}
251
253
}
252
254
0 commit comments