diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 7423a28550c90..42574a80a57e9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -254,7 +254,7 @@ protected function describeContainerDefinition(Definition $definition, array $op foreach ($tagData as $parameters) { $output .= "\n".'- Tag: `'.$tagName.'`'; foreach ($parameters as $name => $value) { - $output .= "\n".' - '.ucfirst($name).': '.$value; + $output .= "\n".' - '.ucfirst($name).': '.(\is_array($value) ? $this->formatParameter($value) : $value); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 06afc5ceacdc9..444f3b512d43f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -209,6 +209,10 @@ protected function describeContainerServices(ContainerBuilder $container, array if (!isset($maxTags[$key])) { $maxTags[$key] = \strlen($key); } + if (\is_array($value)) { + $value = $this->formatParameter($value); + } + if (\strlen($value) > $maxTags[$key]) { $maxTags[$key] = \strlen($value); } @@ -233,7 +237,11 @@ protected function describeContainerServices(ContainerBuilder $container, array foreach ($this->sortByPriority($definition->getTag($showTag)) as $key => $tag) { $tagValues = []; foreach ($tagsNames as $tagName) { - $tagValues[] = $tag[$tagName] ?? ''; + if (\is_array($tagValue = $tag[$tagName] ?? '')) { + $tagValue = $this->formatParameter($tagValue); + } + + $tagValues[] = $tagValue; } if (0 === $key) { $tableRows[] = array_merge([$serviceId], $tagValues, [$definition->getClass()]); @@ -275,7 +283,7 @@ protected function describeContainerDefinition(Definition $definition, array $op $tagInformation = []; foreach ($tags as $tagName => $tagData) { foreach ($tagData as $tagParameters) { - $parameters = array_map(fn ($key, $value) => sprintf('%s: %s', $key, $value), array_keys($tagParameters), array_values($tagParameters)); + $parameters = array_map(fn ($key, $value) => sprintf('%s: %s', $key, \is_array($value) ? $this->formatParameter($value) : $value), array_keys($tagParameters), array_values($tagParameters)); $parameters = implode(', ', $parameters); if ('' === $parameters) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index daafc6011d3d0..cc9cfad683a72 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -169,6 +169,7 @@ public static function getContainerDefinitions() ->addTag('tag1', ['attr1' => 'val1', 'attr2' => 'val2']) ->addTag('tag1', ['attr3' => 'val3']) ->addTag('tag2') + ->addTag('tag3', ['array_attr' => ['foo', 'bar', [[[['ccc']]]]]]) ->addMethodCall('setMailer', [new Reference('mailer')]) ->setFactory([new Reference('factory.service'), 'get']), '.definition_3' => $definition3 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json index 419ee67863813..f3b930983ab3e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json @@ -36,6 +36,24 @@ { "name": "tag2", "parameters": [] + }, + { + "name": "tag3", + "parameters": { + "array_attr": [ + "foo", + "bar", + [ + [ + [ + [ + "ccc" + ] + ] + ] + ] + ] + } } ], "usages": [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md index d25978492e100..3ec9516a398ce 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md @@ -24,4 +24,6 @@ - Tag: `tag1` - Attr3: val3 - Tag: `tag2` +- Tag: `tag3` + - Array_attr: ["foo","bar",[[[["ccc"]]]]] - Usages: .alias_2 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt index 6ab25c269fcd9..46699413a99d6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt @@ -3,24 +3,26 @@ Information for Service ".service_2" ==================================== - ----------------- --------------------------------- -  Option   Value  - ----------------- --------------------------------- - Service ID .service_2 - Class Full\Qualified\Class2 - Tags tag1 (attr1: val1, attr2: val2) - tag1 (attr3: val3) - tag2 - Calls setMailer - Public no - Synthetic yes - Lazy no - Shared yes - Abstract no - Autowired no - Autoconfigured no - Required File /path/to/file - Factory Service factory.service - Factory Method get - Usages .alias_2 - ----------------- --------------------------------- + ----------------- ------------------------------------------------ +  Option   Value  + ----------------- ------------------------------------------------ + Service ID .service_2 + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2) + tag1 (attr3: val3) + tag2 + tag3 (array_attr: ["foo","bar",[[[["ccc"]]]]]) + Calls setMailer + Public no + Synthetic yes + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Service factory.service + Factory Method get + Usages .alias_2 + ----------------- ------------------------------------------------ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml index f9d5c70c80171..aee83ef825506 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml @@ -14,6 +14,9 @@ val3 + + ["foo","bar",[[[["ccc"]]]]] + .alias_2 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json index 9bb716e442e17..ac6d122ce4539 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json @@ -33,6 +33,24 @@ { "name": "tag2", "parameters": [] + }, + { + "name": "tag3", + "parameters": { + "array_attr": [ + "foo", + "bar", + [ + [ + [ + [ + "ccc" + ] + ] + ] + ] + ] + } } ], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md index 3825ed8ebbba4..6dfab327d037a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md @@ -25,6 +25,8 @@ Definitions - Tag: `tag1` - Attr3: val3 - Tag: `tag2` +- Tag: `tag3` + - Array_attr: ["foo","bar",[[[["ccc"]]]]] - Usages: none ### .definition_3 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml index d3cf16a0f4c5a..84499f0845657 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml @@ -15,6 +15,9 @@ val3 + + ["foo","bar",[[[["ccc"]]]]] + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json index 66eb0af836225..5e60f26d170b7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json @@ -33,6 +33,24 @@ { "name": "tag2", "parameters": [] + }, + { + "name": "tag3", + "parameters": { + "array_attr": [ + "foo", + "bar", + [ + [ + [ + [ + "ccc" + ] + ] + ] + ] + ] + } } ], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md index a76b77df04e55..aeae0d9f294ce 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md @@ -25,4 +25,6 @@ Definitions - Tag: `tag1` - Attr3: val3 - Tag: `tag2` +- Tag: `tag3` + - Array_attr: ["foo","bar",[[[["ccc"]]]]] - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml index b2929b01ac403..5413d7e5ea326 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml @@ -14,6 +14,9 @@ val3 + + ["foo","bar",[[[["ccc"]]]]] + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json index e0679f2cac58d..518f694ea3451 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json @@ -38,5 +38,25 @@ ], "usages": [] } + ], + "tag3": [ + { + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autoconfigure": false, + "deprecated": false, + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ], + "usages": [] + } ] } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md index f9558d326e7b3..80da2ddafd560 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md @@ -41,3 +41,24 @@ tag2 - Factory Method: `get` - Call: `setMailer` - Usages: none + + +tag3 +---- + +### .definition_2 + +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- Autoconfigured: no +- Deprecated: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` +- Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt index b10e4661f6701..5be3bb0792754 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt @@ -12,3 +12,8 @@ * .definition_2 +"tag3" tag +---------- + + * .definition_2 + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml index 75a9714f5d8a6..1c68779f0ea71 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml @@ -16,4 +16,12 @@ + + + + + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json index 622904da2ef86..a661428c9cb08 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json @@ -31,6 +31,24 @@ { "name": "tag2", "parameters": [] + }, + { + "name": "tag3", + "parameters": { + "array_attr": [ + "foo", + "bar", + [ + [ + [ + [ + "ccc" + ] + ] + ] + ] + ] + } } ], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md index 376cbdb52348b..486f35fb77a27 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md @@ -17,4 +17,6 @@ - Tag: `tag1` - Attr3: val3 - Tag: `tag2` +- Tag: `tag3` + - Array_attr: ["foo","bar",[[[["ccc"]]]]] - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt index 2b8d3dde599e0..6fdb6d980942e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt @@ -1,22 +1,23 @@ - ----------------- --------------------------------- -  Option   Value  - ----------------- --------------------------------- - Service ID - - Class Full\Qualified\Class2 - Tags tag1 (attr1: val1, attr2: val2) - tag1 (attr3: val3) - tag2 - Calls setMailer - Public no - Synthetic yes - Lazy no - Shared yes - Abstract no - Autowired no - Autoconfigured no - Required File /path/to/file - Factory Service factory.service - Factory Method get - Usages none - ----------------- --------------------------------- + ----------------- ------------------------------------------------ +  Option   Value  + ----------------- ------------------------------------------------ + Service ID - + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2) + tag1 (attr3: val3) + tag2 + tag3 (array_attr: ["foo","bar",[[[["ccc"]]]]]) + Calls setMailer + Public no + Synthetic yes + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Service factory.service + Factory Method get + Usages none + ----------------- ------------------------------------------------ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml index ab072f3e3adf5..4dd3ca0a0b619 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml @@ -13,5 +13,8 @@ val3 + + ["foo","bar",[[[["ccc"]]]]] + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json index 20ef01a34b7a5..eeeb6f44a448b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json @@ -32,6 +32,24 @@ { "name": "tag2", "parameters": [] + }, + { + "name": "tag3", + "parameters": { + "array_attr": [ + "foo", + "bar", + [ + [ + [ + [ + "ccc" + ] + ] + ] + ] + ] + } } ], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md index f5bf50e61764c..5b427bff5a26f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md @@ -18,4 +18,6 @@ - Tag: `tag1` - Attr3: val3 - Tag: `tag2` +- Tag: `tag3` + - Array_attr: ["foo","bar",[[[["ccc"]]]]] - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt index 2b8d3dde599e0..43ca2cffa0ae3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt @@ -1,22 +1,23 @@ - ----------------- --------------------------------- -  Option   Value  - ----------------- --------------------------------- - Service ID - - Class Full\Qualified\Class2 - Tags tag1 (attr1: val1, attr2: val2) - tag1 (attr3: val3) - tag2 - Calls setMailer - Public no - Synthetic yes - Lazy no - Shared yes - Abstract no - Autowired no - Autoconfigured no - Required File /path/to/file - Factory Service factory.service - Factory Method get - Usages none - ----------------- --------------------------------- + ----------------- ------------------------------------------------ +  Option   Value  + ----------------- ------------------------------------------------ + Service ID - + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2) + tag1 (attr3: val3) + tag2 + tag3 (array_attr: ["foo","bar",[[[["ccc"]]]]]) + Calls setMailer + Public no + Synthetic yes + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Service factory.service + Factory Method get + Usages none + ----------------- ------------------------------------------------ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml index ab072f3e3adf5..4dd3ca0a0b619 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml @@ -13,5 +13,8 @@ val3 + + ["foo","bar",[[[["ccc"]]]]] + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy