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 tags using colon#22913

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

Closed
GuilhemN wants to merge2 commits intosymfony:3.4fromGuilhemN:tagswithcomma

Conversation

@GuilhemN
Copy link
Contributor

@GuilhemNGuilhemN commentedMay 25, 2017
edited
Loading

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

Using a colon in a tag doesn't look like yaml and causes trouble (see#22878), so I propose to just deprecate these tags in favor of more consistent tags.

-!php/const:PHP_INT_MAX-!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}

would become

-!php/constPHP_INT_MAX-!php/objectO:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}

teohhanhui, jvasseur, Taluu, ro0NL, and sstok reacted with thumbs up emojiteohhanhui reacted with heart emoji
@xabbuh
Copy link
Member

👍 (we will probably still need some special handling for the!php/const tag though as referring to class constants still requires us to use colons inside a mapping key)

@xabbuhxabbuh added this to the3.4 milestoneMay 25, 2017
@GuilhemN
Copy link
ContributorAuthor

The handling won't be dedicated, the value will just need to be quoted:

!php/const "Foo::BAR": quz

@GuilhemN
Copy link
ContributorAuthor

PR broken for now, will fix it later.

@GuilhemNGuilhemN changed the title[Yaml] Deprecate tags using colon[WIP][Yaml] Deprecate tags using colonMay 29, 2017
```yml
!php/const PHP_INT_MAX
```
>>>>>>>[Yaml] Deprecate tags using colon
Copy link
Member

Choose a reason for hiding this comment

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

this line must be removed. You messed some conflict resolution

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

indeed

@GuilhemNGuilhemN changed the title[WIP][Yaml] Deprecate tags using colon[Yaml] Deprecate tags using colonJun 29, 2017
@GuilhemN
Copy link
ContributorAuthor

Rebased on 3.4, it should be ok now.

@fabpot
Copy link
Member

@xabbuh Can you check this one please?

@GuilhemN
Copy link
ContributorAuthor

The build failure is because this is not yet in master.

@chalasr
Copy link
Member

Needs rebase

@GuilhemN
Copy link
ContributorAuthor

@chalasr rebased.

Copy link
Member

@xabbuhxabbuh left a comment

Choose a reason for hiding this comment

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

just a few minor comments

3.4.0
-----

* Deprecated the tag`!php/object:` tag which will be replaced by the
Copy link
Member

Choose a reason for hiding this comment

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

the "tag" in front of!php/object: should be removed

* Deprecated the tag`!php/object:` tag which will be replaced by the
`!php/object` tag (without the colon) in 4.0.

* Deprecated the tag`!php/const:` tag which will be replaced by the
Copy link
Member

Choose a reason for hiding this comment

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

the "tag" in front of!php/const: should be removed

if (self::$exceptionOnInvalidType) {
thrownewParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?',$scalar));
}

Copy link
Member

Choose a reason for hiding this comment

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

no need for this blank line

@GuilhemN
Copy link
ContributorAuthor

@xabbuh fixed

@xabbuh
Copy link
Member

Thank you@GuilhemN.

xabbuh added a commit that referenced this pull requestAug 4, 2017
This PR was squashed before being merged into the 3.4 branch (closes#22913).Discussion----------[Yaml] Deprecate tags using colon| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Using a colon in a tag doesn't look like yaml and causes trouble (see#22878), so I propose to just deprecate these tags in favor of more consistent tags.```yml- !php/const:PHP_INT_MAX- !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}```would become```yml- !php/const PHP_INT_MAX- !php/object O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}```Commits-------9815af3 [Yaml] Deprecate tags using colon
@xabbuhxabbuh closed thisAug 4, 2017
@GuilhemNGuilhemN deleted the tagswithcomma branchAugust 4, 2017 15:03
fabpot added a commit that referenced this pull requestJun 25, 2022
This PR was merged into the 6.2 branch.Discussion----------[Yaml] Remove legacy parsing rule| Q             | A| ------------- | ---| Branch?       | 6.2| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -As far as I understood correctly, this part of the regexp has been introduced in#22878 to support a syntax that has been deprecated in#22913 and removed in 4.0.Commits-------5d7f9f2 [Yaml] Remove legacy parsing rule
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

@xabbuhxabbuhxabbuh approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@GuilhemN@xabbuh@fabpot@chalasr@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp