-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
bin/console config:dump-reference dumps invalid yaml #54154
New issue
Have a question about this pro 8000 ject? 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
Comments
in YamlReferenceDumper.php, $message is Examples, and is prefixed by # to comment it out. But the array is dumped normally, but its lines, too, should be commented out. $this->writeLine('# '.$message.':', $depth * 4 + 4);
$this->writeArray(array_map(Inline::dump(...), $example), $depth + 1); The test behavior shows this, but it doesn't make much sense, it should be variable:
# Examples:
# - foo
# - bar I'm not sure how to write writeArray to prefix everything with a #, any suggestions? |
You could add an optional boolean That being said I would have done the same instead of #39336 so maybe we’re missing something 🤔 |
Thanks, I've submitted a PR: #54326 |
This PR was squashed before being merged into the 7.0 branch. Discussion ---------- [Yaml] prefix examples with # | 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. Commits ------- fd95a8f [Yaml] prefix examples with #
Symfony version(s) affected
7.0.4
Description
The following yaml, created from config:dump-reference, is invalid, because it has ~ and a list
How to reproduce
[WARNING] 0 YAML files have valid syntax and 1 contain errors.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: