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] deprecate parsing mappings without keys#21643

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:masterfromxabbuh:scalar-mapping-keys
Feb 17, 2017

Conversation

@xabbuh
Copy link
Member

@xabbuhxabbuh commentedFeb 17, 2017
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

publicfunctiontestTheEmptyStringIsAValidMappingKey()
{
$this->assertSame(array('' =>'foo'), Inline::parse('{ "": foo }'));
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The two tests above were already passing without this patch. I just added them to prevent future regressions.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Not sure if we shouldn't just add these two tests in2.7 now.

Copy link
Member

Choose a reason for hiding this comment

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

👍 for adding them in an older version, to prevent regressions on them when doing bugfixes in older branches

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@stof
Copy link
Member

what is the existing behavior for a mapping without key ?

@stof
Copy link
Member

if the parser is not broken currently for such case, and so accepts the input (even though it is not compliant), we should rather deprecate it instead, to be consistent with our previous changes where we give users time to update their YAML files

@xabbuh
Copy link
MemberAuthor

The parser behaviour currently is inconsistent since some changes we made in 3.2. However, you are right that we should deprecate it first onmaster (#21647 will make sure that the wrong behaviour is restored in the3.2 branch).

Status: Needs work

@xabbuhxabbuh changed the base branch from2.7 tomasterFebruary 17, 2017 11:35
@xabbuhxabbuh changed the title[Yaml] fail when parsing mappings without keys[Yaml] deprecate parsing mappings without keysFeb 17, 2017
@xabbuhxabbuhforce-pushed thescalar-mapping-keys branch 2 times, most recently from5022517 tof2ab286CompareFebruary 17, 2017 11:47
@xabbuh
Copy link
MemberAuthor

I updated here to deprecate the possibility to omit mapping keys and changed the target branch tomaster. Please not that this contains the changes from#21647 and needs to be merged afterwards.

Status: Needs Review

@stof
Copy link
Member

the other PR is now merged (including in master)

@xabbuh
Copy link
MemberAuthor

rebased

@stof
Copy link
Member

👍

Yaml
----

* Omitting the key of a mapping is deprecated and will lead to a`ParseException` in Symfony 4.0.
Copy link
Member

Choose a reason for hiding this comment

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

and throws a?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

updated

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commitc02dca3 intosymfony:masterFeb 17, 2017
fabpot added a commit that referenced this pull requestFeb 17, 2017
This PR was merged into the 3.3-dev branch.Discussion----------[Yaml] deprecate parsing mappings without keys| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Commits-------c02dca3 [Yaml] deprecate parsing mappings without keys
@xabbuhxabbuh deleted the scalar-mapping-keys branchFebruary 17, 2017 16:32
fabpot added a commit that referenced this pull requestMar 1, 2017
This PR was merged into the 2.7 branch.Discussion----------[Yaml] add tests for specific mapping keys| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | see#21643 (comment)| License       | MIT| Doc PR        |Commits-------b8e0d70 [Yaml] add tests for specific mapping keys
symfony-splitter pushed a commit to symfony/yaml that referenced this pull requestMar 1, 2017
This PR was merged into the 2.7 branch.Discussion----------[Yaml] add tests for specific mapping keys| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | seesymfony/symfony#21643 (comment)| License       | MIT| Doc PR        |Commits-------b8e0d705f6 [Yaml] add tests for specific mapping keys
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

4 participants

@xabbuh@stof@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp