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] support YAML 1.2 octal notation, deprecate YAML 1.1 one #34813

Merged
merged 1 commit into from May 5, 2020

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 4, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? yes
Tickets Fix #34807
License MIT
Doc PR

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

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

should we also add support for parsing YAML 1.2 octal notation with 0o ?

src/Symfony/Component/Yaml/Inline.php Outdated Show resolved Hide resolved
@trigger_error(sprintf('Support for parsing the invalid octal number %s is deprecated since Symfony 5.1.', $scalar), E_USER_DEPRECATED);
}

return '0' == $scalar[1] ? -octdec($octal) : (($raw === (string) $cast) ? $cast : $raw);
Copy link
Member

Choose a reason for hiding this comment

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

should be a string comparison

@Nyholm
Copy link
Member

Nyholm commented May 3, 2020

@xabbuh Friendly ping

@xabbuh xabbuh force-pushed the issue-34807 branch 2 times, most recently from d3dfffb to 671f0ca Compare May 4, 2020 10:17
@xabbuh xabbuh changed the title [Yaml] deprecate parsing octal numbers with invalid formats [Yaml] support YAML 1.2 octal notation, deprecate YAML 1.1 one May 4, 2020
@xabbuh xabbuh added the Feature label May 4, 2020
@xabbuh xabbuh modified the milestones: next, 5.1 May 4, 2020
@fabpot
Copy link
Member

fabpot commented May 5, 2020

Thank you @xabbuh.

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.

[YAML] Parsing octal numbers: unexpected value conversion and PHP 7.4 notice
6 participants