@@ -59,17 +59,17 @@ protected function describeContainerService(object $service, array $options = []
5959 throw new \InvalidArgumentException ('An "id" option must be provided. ' );
6060 }
6161
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 ));
6363 }
6464
6565 protected function describeContainerServices (ContainerBuilder $ container , array $ options = []): void
6666 {
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 ));
6868 }
6969
7070 protected function describeContainerDefinition (Definition $ definition , array $ options = [], ?ContainerBuilder $ container = null ): void
7171 {
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 ));
7373 }
7474
7575 protected function describeContainerAlias (Alias $ alias , array $ options = [], ?ContainerBuilder $ container = null ): void
@@ -83,7 +83,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], ?Co
8383 return ;
8484 }
8585
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 ->item (0 ), true ));
8787
8888 $ this ->writeDocument ($ dom );
8989 }
@@ -260,25 +260,25 @@ private function getContainerTagsDocument(ContainerBuilder $container, bool $sho
260260 $ tagXML ->setAttribute ('name ' , $ tag );
261261
262262 foreach ($ definitions as $ serviceId => $ definition ) {
263- $ definitionXML = $ this ->getContainerDefinitionDocument ($ definition , $ serviceId , true , false , $ container );
263+ $ definitionXML = $ this ->getContainerDefinitionDocument ($ definition , $ serviceId , true , $ container );
264264 $ tagXML ->appendChild ($ dom ->importNode ($ definitionXML ->childNodes ->item (0 ), true ));
265265 }
266266 }
267267
268268 return $ dom ;
269269 }
270270
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
272272 {
273273 $ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
274274
275275 if ($ service instanceof Alias) {
276276 $ dom ->appendChild ($ dom ->importNode ($ this ->getContainerAliasDocument ($ service , $ id )->childNodes ->item (0 ), true ));
277277 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 ));
279279 }
280280 } 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 ));
282282 } else {
283283 $ dom ->appendChild ($ serviceXML = $ dom ->createElement ('service ' ));
284284 $ serviceXML ->setAttribute ('id ' , $ id );
@@ -288,7 +288,7 @@ private function getContainerServiceDocument(object $service, string $id, ?Conta
288288 return $ dom ;
289289 }
290290
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
292292 {
293293 $ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
294294 $ dom ->appendChild ($ containerXML = $ dom ->createElement ('container ' ));
@@ -311,14 +311,14 @@ private function getContainerServicesDocument(ContainerBuilder $container, ?stri
311311 continue ;
312312 }
313313
314- $ serviceXML = $ this ->getContainerServiceDocument ($ service , $ serviceId , null , $ showArguments );
314+ $ serviceXML = $ this ->getContainerServiceDocument ($ service , $ serviceId , null );
315315 $ containerXML ->appendChild ($ containerXML ->ownerDocument ->importNode ($ serviceXML ->childNodes ->item (0 ), true ));
316316 }
317317
318318 return $ dom ;
319319 }
320320
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
322322 {
323323 $ dom = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
324324 $ dom ->appendChild ($ serviceXML = $ dom ->createElement ('definition ' ));
@@ -378,10 +378,8 @@ private function getContainerDefinitionDocument(Definition $definition, ?string
378378 }
379379 }
380380
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 );
385383 }
386384
387385 if (!$ omitTags ) {
@@ -443,7 +441,7 @@ private function getArgumentNodes(array $arguments, \DOMDocument $dom, ?Containe
443441 $ argumentXML ->appendChild ($ childArgumentXML );
444442 }
445443 } 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 ));
447445 } elseif ($ argument instanceof AbstractArgument) {
448446 $ argumentXML ->setAttribute ('type ' , 'abstract ' );
449447 $ argumentXML ->appendChild (new \DOMText ($ argument ->getText ()));
0 commit comments