-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] remove deprecated features #22770
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
xabbuh
commented
May 19, 2017
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | no |
BC breaks? | yes |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
e6c9a2d
to
6f4ad01
Compare
38d9b3d
to
020178b
Compare
020178b
to
5d584de
Compare
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.
👍
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.
👍
if (!(Yaml::PARSE_KEYS_AS_STRINGS & $flags)) { | ||
$evaluatedKey = self::evaluateScalar($key, $flags, $references); | ||
|
||
if ('' !== $key && $evaluatedKey !== $key && !is_string($evaluatedKey)) { | ||
@trigger_error('Implicit casting of incompatible mapping keys to strings is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Pass the PARSE_KEYS_AS_STRING flag to explicitly enable the type casts.', E_USER_DEPRECATED); | ||
throw new ParseException('Non-string mapping keys are not supported. Pass the Yaml::PARSE_KEYS_AS_STRINGS flag to cast them to strings.', self::$parsedLineNumber + 1, $mapping); | ||
} | ||
} | ||
|
||
if (':' !== $key && (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', ',', '[', ']', '{', '}'), true))) { |
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.
':' !== $key
should be removed, right?
@@ -481,24 +427,20 @@ private static function parseMapping($mapping, $flags, &$i = 0, $references = ar | ||
// key | ||
$key = self::parseScalar($mapping, $flags, array(':', ' '), $i, false, array(), true); |
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 last argument should be removed, isn't it? (and the according logic in parseScalar
)
5d584de
to
efe2337
Compare
Thank you @xabbuh. |
This PR was merged into the 4.0-dev branch. Discussion ---------- [Yaml] remove deprecated features | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- efe2337 [Yaml] remove deprecated features