Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Yaml] Add theYaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES flag to enforce double quotes around string values#59880

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.3fromsigwinhq:feat/yaml-force-quotes
Mar 8, 2025

Conversation

dkarlovi
Copy link
Contributor

@dkarlovidkarlovi commentedFeb 28, 2025
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#59680
LicenseMIT

In some scenarios, quoting even safe values is encouraged by various inspectors, for example PHPStorm inspectors will mark it with a warning when used in KubernetesConfigMap dump.

This option allows forcing the quotes even when technically not required, see#59680 for an example.

@carsonbot

This comment was marked as resolved.

@carsonbot

This comment was marked as resolved.

@dkarlovi
Copy link
ContributorAuthor

Build failures unrelated.

Copy link
Member

@alexandre-dauboisalexandre-daubois left a comment
edited
Loading

Choose a reason for hiding this comment

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

Yaml also supports quoting keys. Maybe the constant name should reflect that only values are actually quoted, not keys?

dkarlovi reacted with thumbs up emoji
@dkarlovidkarlovi changed the title[Yaml] Add force dumping with quotes support by using theYaml::DUMP_FORCE_QUOTES flag[Yaml] Add theYaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES flag to enforce double quotes around string valuesMar 4, 2025
@dkarlovidkarloviforce-pushed thefeat/yaml-force-quotes branch froma3950ea to4c68909CompareMarch 4, 2025 10:11
@dkarlovi
Copy link
ContributorAuthor

Fixed and squashed.

@dkarlovidkarloviforce-pushed thefeat/yaml-force-quotes branch from4c68909 to1c06770CompareMarch 6, 2025 16:19
@fabpot
Copy link
Member

Thank you@dkarlovi.

@fabpotfabpot merged commit3d4e0d6 intosymfony:7.3Mar 8, 2025
10 of 11 checks passed
@dkarlovidkarlovi deleted the feat/yaml-force-quotes branchMarch 8, 2025 16:09
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alexandre-dauboisalexandre-dauboisalexandre-daubois approved these changes

@fabpotfabpotfabpot approved these changes

@SpomkySpomkySpomky approved these changes

@xabbuhxabbuhxabbuh approved these changes

@mtarldmtarldmtarld approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

[Yaml] allow forcing quotes with dump() even if they're technically not required
7 participants
@dkarlovi@carsonbot@fabpot@Spomky@xabbuh@alexandre-daubois@mtarld

[8]ページ先頭

©2009-2025 Movatter.jp