-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👍 (we will probably still need some special handling for the |
The handling won't be dedicated, the value will just need to be quoted: !php/const "Foo::BAR": quz |
PR broken for now, will fix it later. |
UPGRADE-3.4.md
Outdated
```yml | ||
!php/const PHP_INT_MAX | ||
``` | ||
>>>>>>> [Yaml] Deprecate tags using colon |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
Rebased on 3.4, it should be ok now. |
@xabbuh Can you check this one please? |
84bd287
to
8ee9609
Compare
The build failure is because this is not yet in master. |
Needs rebase |
@chalasr rebased. |
There was a problem hiding this 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
@@ -4,6 +4,12 @@ CHANGELOG | |||
3.4.0 | |||
----- | |||
|
|||
* Deprecated the tag`!php/object:` tag which will be replaced by the |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
@@ -653,6 +667,20 @@ private static function evaluateScalar($scalar, $flags, $references = array()) | |||
} | |||
|
|||
return; | |||
|
There was a problem hiding this comment.
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
@xabbuh fixed |
Thank you @GuilhemN. |
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
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
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.
would become