Skip to content

[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

Merged
merged 1 commit into from
Jun 14, 2017

Conversation

GuilhemN
Copy link
Contributor

@GuilhemN GuilhemN commented May 25, 2017

Q A
Branch? 3.4
Bug fix? no
New feature? no
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).

I applied this change in #22762 to comply with the spec.

@@ -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);
Copy link
Member

Choose a reason for hiding this comment

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

3.4

Copy link
Contributor Author

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.
Copy link
Member

Choose a reason for hiding this comment

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

3.4

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 25, 2017
@fabpot
Copy link
Member

fabpot commented Jun 14, 2017

Thank you @GuilhemN.

@fabpot fabpot merged commit 60f5046 into symfony:3.4 Jun 14, 2017
fabpot added a commit that referenced this pull request Jun 14, 2017
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
@GuilhemN GuilhemN deleted the NONSPECIFICTAG branch June 15, 2017 04:54
This was referenced Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants