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] fix parsing negative octal numbers #34812

Merged
merged 1 commit into from Dec 7, 2019

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 4, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

@xabbuh
Copy link
Member Author

xabbuh commented Dec 4, 2019

while working on #34807 I realised that we actually do not correctly parse negative octal numbers

@stof
Copy link
Member

stof commented Dec 4, 2019

Based on https://yaml.org/spec/1.2/spec.html#id2805071, I don't think negative octal actually make sense in YAML

@stof
Copy link
Member

stof commented Dec 4, 2019

OK, according to https://yaml.org/type/int.html, they do make sense in YAML 1.1 (and this octal without 0o is the 1.1 octal syntax). I think we need to clarify which YAML spec we follow in the component (I think the current answer is "a mix of 1.1 and 1.2, being compliant with none of the 2 due to the mix")

@xabbuh
Copy link
Member Author

xabbuh commented Dec 4, 2019

In #34813 I am working on a deprecation. Looks like I need to improve that a bit so that in the future we will only support the 0o prefix.

@fabpot
Copy link
Member

fabpot commented Dec 7, 2019

Thank you @xabbuh.

fabpot added a commit that referenced this pull request Dec 7, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix parsing negative octal numbers

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

Commits
-------

7ab53f9 fix parsing negative octal numbers
@fabpot fabpot merged commit 7ab53f9 into symfony:3.4 Dec 7, 2019
@xabbuh xabbuh deleted the parse-negative-octal-numbers branch December 7, 2019 14:03
This was referenced Dec 19, 2019
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

5 participants