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] Throw on unquoted exclamation mark #35364

Merged
merged 1 commit into from Jan 21, 2020

Conversation

fancyweb
Copy link
Contributor

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

@fancyweb
Copy link
Contributor Author

Note that there are some values that currently works but that will throw now (and they should throw). For example:

  • Empty ! in an array --> [!] currently gives ['']
  • Empty ! in an object --> {foo: !} currently gives a TaggedValue with empty tag and value
  • ! followed by (] or } or ,) --> !} currently gives }

@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Jan 17, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(with minor comments)

src/Symfony/Component/Yaml/Inline.php Outdated Show resolved Hide resolved
src/Symfony/Component/Yaml/Tests/InlineTest.php Outdated Show resolved Hide resolved
@fancyweb fancyweb force-pushed the yaml-unquoted-exclamation-mark branch from 5bf5e0e to 6b4147c Compare January 17, 2020 11:30
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Jan 21, 2020
This PR was merged into the 4.3 branch.

Discussion
----------

[Yaml] Throw on unquoted exclamation mark

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |
| Tickets       | #35344
| License       | MIT
| Doc PR        | -

Commits
-------

6b4147c [Yaml] Throw on unquoted exclamation mark
@nicolas-grekas nicolas-grekas merged commit 6b4147c into symfony:4.3 Jan 21, 2020
@fancyweb fancyweb deleted the yaml-unquoted-exclamation-mark branch January 21, 2020 11:17
This was referenced Jan 21, 2020
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

4 participants