@@ -59,17 +59,17 @@ protected function describeContainerService(object $service, array $options = []
59
59
throw new \InvalidArgumentException ('An "id" option must be provided. ' );
60
60
}
61
61
62
- $ this ->writeDocument ($ this ->getContainerServiceDocument ($ service , $ options ['id ' ], $ container, isset ( $ options [ ' show_arguments ' ]) && $ options [ ' show_arguments ' ] ));
62
+ $ this ->writeDocument ($ this ->getContainerServiceDocument ($ service , $ options ['id ' ], $ container ));
63
63
}
64
64
65
65
protected function describeContainerServices (ContainerBuilder $ container , array $ options = []): void
66
66
{
67
- $ this ->writeDocument ($ this ->getContainerServicesDocument ($ container , $ options ['tag ' ] ?? null , isset ($ options ['show_hidden ' ]) && $ options ['show_hidden ' ], isset ( $ options [ ' show_arguments ' ]) && $ options [ ' show_arguments ' ], $ options ['filter ' ] ?? null ));
67
+ $ this ->writeDocument ($ this ->getContainerServicesDocument ($ container , $ options ['tag ' ] ?? null , isset ($ options ['show_hidden ' ]) && $ options ['show_hidden ' ], $ options ['filter ' ] ?? null ));
68
68
}
69
69
70
70
protected function describeContainerDefinition (Definition $ definition , array $ options = [], ?ContainerBuilder $ container = null ): void
71
71
{
72
- $ this ->writeDocument ($ this ->getContainerDefinitionDocument ($ definition , $ options ['id ' ] ?? null , isset ($ options ['omit_tags ' ]) && $ options ['omit_tags ' ], isset ( $ options [ ' show_arguments ' ]) && $ options [ ' show_arguments ' ], $ container ));
72
+ $ this ->writeDocument ($ this ->getContainerDefinitionDocument ($ definition , $ options ['id ' ] ?? null , isset ($ options ['omit_tags ' ]) && $ options ['omit_tags ' ], $ container ));
73
73
}
74
74
75
75
protected function describeContainerAlias (Alias $ alias , array $ options = [], ?ContainerBuilder $ container = null ): void
@@ -83,7 +83,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], ?Co
83
83
return ;
84
84
}
85
85
86
- $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ container ->getDefinition ((string ) $ alias ), (string ) $ alias , false , false , $ container )->childNodes ->item (0 ), true ));
86
+ $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ container ->getDefinition ((string ) $ alias ), (string ) $ alias , false , $ container )->childNodes ->i
10000
tem (0 ), true ));
87
87
88
88
$ this ->writeDocument ($ dom );
89
89
}
@@ -260,25 +260,25 @@ private function getContainerTagsDocument(ContainerBuilder $container, bool $sho
260
260
$ tagXML ->setAttribute ('name ' , $ tag );
261
261
262
262
foreach ($ definitions as $ serviceId => $ definition ) {
263
- $ definitionXML = $ this ->getContainerDefinitionDocument ($ definition , $ serviceId , true , false , $ container );
263
+ $ definitionXML = $ this ->getContainerDefinitionDocument ($ definition , $ serviceId , true , $ container );
264
264
$ tagXML ->appendChild ($ dom ->importNode ($ definitionXML ->childNodes ->item (0 ), true ));
265
265
}
266
266
}
267
267
268
268
return $ dom ;
269
269
}
270
270
271
- private function getContainerServiceDocument (object $ service , string $ id , ?ContainerBuilder $ container = null , bool $ showArguments = false ): \DOMDocument
271
+ private function getContainerServiceDocument (object $ service , string $ id , ?ContainerBuilder $ container = null ): \DOMDocument
272
272
{
273
273
$ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
274
274
275
275
if ($ service instanceof Alias) {
276
276
$ dom ->appendChild ($ dom ->importNode ($ this ->getContainerAliasDocument ($ service , $ id )->childNodes ->item (0 ), true ));
277
277
if ($ container ) {
278
- $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ container ->getDefinition ((string ) $ service ), (string ) $ service , false , $ showArguments , $ container )->childNodes ->item (0 ), true ));
278
+ $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ container ->getDefinition ((string ) $ service ), (string ) $ service , false , $ container )->childNodes ->item (0 ), true ));
279
279
}
280
280
} elseif ($ service instanceof Definition) {
281
- $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ service , $ id , false , $ showArguments , $ container )->childNodes ->item (0 ), true ));
281
+ $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ service , $ id , false , $ container )->childNodes ->item (0 ), true ));
282
282
} else {
283
283
$ dom ->appendChild ($ serviceXML = $ dom ->createElement ('service ' ));
284
284
$ serviceXML ->setAttribute ('id ' , $ id );
@@ -288,7 +288,7 @@ private function getContainerServiceDocument(object $service, string $id, ?Conta
288
288
return $ dom ;
289
289
}
290
290
291
- private function getContainerServicesDocument (ContainerBuilder $ container , ?string $ tag = null , bool $ showHidden = false , bool $ showArguments = false , ?callable $ filter = null ): \DOMDocument
291
+ private function getContainerServicesDocument (ContainerBuilder $ container , ?string $ tag = null , bool $ showHidden = false , ?callable $ filter = null ): \DOMDocument
292
292
{
293
293
$ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
294
294
$ dom ->appendChild ($ containerXML = $ dom ->createElement ('container ' ));
@@ -311,14 +311,14 @@ private function getContainerServicesDocument(ContainerBuilder $container, ?stri
311
311
continue ;
312
312
}
313
313
314
- $ serviceXML = $ this ->getContainerServiceDocument ($ service , $ serviceId , null , $ showArguments );
314
+ $ serviceXML = $ this ->getContainerServiceDocument ($ service , $ serviceId , null );
315
315
$ containerXML ->appendChild ($ containerXML ->ownerDocument ->importNode ($ serviceXML ->childNodes ->item (0 ), true ));
316
316
}
317
317
318
318
return $ dom ;
319
319
}
320
320
321
- private function getContainerDefinitionDocument (Definition $ definition , ?string $ id = null , bool $ omitTags = false , bool $ showArguments = false , ?ContainerBuilder $ container = null ): \DOMDocument
321
+ private function getContainerDefinitionDocument (Definition $ definition , ?string $ id = null , bool $ omitTags = false , ?ContainerBuilder $ container = null ): \DOMDocument
322
322
{
323
323
$ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
324
324
$ dom ->appendChild ($ serviceXML = $ dom ->createElement ('definition ' ));
@@ -378,10 +378,8 @@ private function getContainerDefinitionDocument(Definition $definition, ?string
378
378
}
379
379
}
380
380
381
- if ($ showArguments ) {
382
- foreach ($ this ->getArgumentNodes ($ definition ->getArguments (), $ dom , $ container ) as $ node ) {
383
- $ serviceXML ->appendChild ($ node );
384
- }
381
+ foreach ($ this ->getArgumentNodes ($ definition ->getArguments (), $ dom , $ container ) as $ node ) {
382
+ $ serviceXML ->appendChild ($ node );
385
383
}
386
384
387
385
if (!$ omitTags ) {
@@ -443,7 +441,7 @@ private function getArgumentNodes(array $arguments, \DOMDocument $dom, ?Containe
443
441
$ argumentXML ->appendChild ($ childArgumentXML );
444
442
}
445
443
} elseif ($ argument instanceof Definition) {
446
- $ argumentXML ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ argument , null , false , true , $ container )->childNodes ->item (0 ), true ));
444
+ $ argumentXML ->appendChild ($ dom ->importNode ($ this ->getContainerDefinitionDocument ($ argument , null , false , $ container )->childNodes ->item (0 ), true ));
447
445
} elseif ($ argument instanceof AbstractArgument) {
448
446
$ argumentXML ->setAttribute ('type ' , 'abstract ' );
449
447
$ argumentXML ->appendChild (new \DOMText ($ argument ->getText ()));
0 commit comments