Skip to content

[FrameworkBundle] Handle tags array attributes in descriptors #51669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

fancyweb
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets #51636
License MIT
Doc PR -

Targeting 6.3 since array attributes are only possible in tags since 6.2.

@@ -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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't do a simple explode because we allow array of array of array etc. So I think it's alright to reuse the formatParameter method (see tests for example output).

@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit 0552d19 into symfony:6.3 Sep 19, 2023
@fancyweb fancyweb deleted the fwb/handle-array-attrs branch September 19, 2023 14:32
@fabpot fabpot mentioned this pull request Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants