Skip to content

Navigation Menu

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

Appearance settings

[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

Merged
merged 1 commit into from
May 24, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh 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

@xabbuh xabbuh force-pushed the remove-deprecated-yaml-features branch 2 times, most recently from e6c9a2d to 6f4ad01 Compare May 19, 2017 08:35
@nicolas-grekas nicolas-grekas added this to the 4.0 milestone May 19, 2017
@xabbuh xabbuh force-pushed the remove-deprecated-yaml-features branch 3 times, most recently from 38d9b3d to 020178b Compare May 21, 2017 11:06
@xabbuh xabbuh force-pushed the remove-deprecated-yaml-features branch from 020178b to 5d584de Compare May 21, 2017 12:03
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@GuilhemN GuilhemN left a 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))) {
Copy link
Contributor

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

@GuilhemN GuilhemN May 24, 2017

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)

@xabbuh xabbuh force-pushed the remove-deprecated-yaml-features branch from 5d584de to efe2337 Compare May 24, 2017 11:52
@fabpot
Copy link
Member

fabpot commented May 24, 2017

Thank you @xabbuh.

@fabpot fabpot merged commit efe2337 into symfony:master May 24, 2017
fabpot added a commit that referenced this pull request May 24, 2017
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
@xabbuh xabbuh deleted the remove-deprecated-yaml-features branch May 24, 2017 15:15
@fabpot fabpot mentioned this pull request Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.