Skip to content

[Yaml] do not trigger deprecations for valid YAML #20855

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

Merged
merged 1 commit into from
Dec 13, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 10, 2016

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #19874
License MIT
Doc PR

if (!isset($mapping[$i + 1]) || ' ' !== $mapping[$i + 1]) {
@trigger_error('Omitting the space after the colon that follows a mapping key definition is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED);
if (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', '[', ']', '{', '}'), true)) {
@trigger_error('Using a colon that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}" is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED);
Copy link
Contributor

Choose a reason for hiding this comment

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

will be considered as part of the value in 4.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be misleading as the current outcome is depending on the actual YAML input. You may get an exception, but the colon might also be treated as part of the mapping key.

@fabpot
Copy link
Member

fabpot commented Dec 13, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit 1436349 into symfony:3.2 Dec 13, 2016
fabpot added a commit that referenced this pull request Dec 13, 2016
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] do not trigger deprecations for valid YAML

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19874
| License       | MIT
| Doc PR        |

Commits
-------

1436349 do not trigger deprecations for valid YAML
@xabbuh xabbuh deleted the issue-19874-deprecation-refinement branch December 13, 2016 08:39
@fabpot fabpot mentioned this pull request Dec 13, 2016
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.

5 participants