-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] Deprecate using the non-specific tag #22909
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
@@ -610,6 +610,8 @@ private static function evaluateScalar($scalar, $flags, $references = array()) | |||
case 0 === strpos($scalar, '!str'): | |||
return (string) substr($scalar, 5); | |||
case 0 === strpos($scalar, '! '): | |||
@trigger_error('Using the non-specific tag "!" is deprecated since version 3.3 as its behavior will change in 4.0. It will force non-evaluating your values in 4.0. Use plain integers or !!float instead.', E_USER_DEPRECATED); |
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.
3.4
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, thanks!
@@ -928,6 +928,7 @@ documents: 2 | |||
|
|||
--- | |||
test: Explicit typing | |||
deprecated: Using the non-specific tag "!" is deprecated since version 3.3 as its behavior will change in 4.0. |
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.
3.4
Thank you @GuilhemN. |
This PR was merged into the 3.4 branch. Discussion ---------- [Yaml] Deprecate using the non-specific tag | 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 | Values tagged with the non-specific tag must not be transformed in an integer, this tag means that they must not be evaluated (see [the spec](http://www.yaml.org/spec/1.2/spec.html#tag/non-specific/)). I applied this change in #22762 to comply with the spec. Commits ------- 60f5046 [Yaml] Deprecate using the non-specific tag
Values tagged with the non-specific tag must not be transformed in an integer, this tag means that they must not be evaluated (see the spec).
I applied this change in #22762 to comply with the spec.