Skip to content
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

[Yaml] prefix examples with # #54326

Merged
merged 1 commit into from Mar 22, 2024

Conversation

tacman
Copy link
Contributor

@tacman tacman commented Mar 18, 2024

Q A
Branch? 7.0
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix ##54154
License MIT

As mentioned in the issue, the yaml before wasn't valid, as the examples were dumped as an array in the yaml. This simply comments the examples.

@carsonbot carsonbot changed the title prefix examples with # [Yaml] prefix examples with # Mar 19, 2024
@MatTheCat
Copy link
Contributor

This PR changes #39336 behavior. If it is okay the corresponding condition probably need to be removed.

} elseif (VariableNode::class === $node::class && \is_array($example)) {

@MatTheCat
Copy link
Contributor

Isn't this issue prior to 7.0?

@fabpot fabpot force-pushed the dump-reference-examples-as-comments branch from 5a52070 to fd95a8f Compare March 22, 2024 07:59
@fabpot
Copy link
Member

fabpot commented Mar 22, 2024

Thank you @tacman.

@fabpot fabpot merged commit afc47ed into symfony:7.0 Mar 22, 2024
7 of 10 checks passed
fabpot added a commit that referenced this pull request Mar 23, 2024
…les (MatTheCat)

This PR was merged into the 5.4 branch.

Discussion
----------

[Config] Fix `YamlReferenceDumper` handling of array examples

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #54326
| License       | MIT

#54326 was based on a wrong branch.

It seems example arrays were considered as default values in some cases. Now that they are displayed as comments, this PR ensures the default value makes sense.

Commits
-------

4d4b552 [Config] Fix `YamlReferenceDumper` handling of array examples
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.

None yet

6 participants