Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[yaml] Fix!php/* tag should not contain: at the end for Symfony 4#8698

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
jeromemacias wants to merge2 commits intosymfony:masterfromjeromemacias:patch-1

Conversation

@jeromemacias
Copy link
Contributor

As mentioned in theupgrade guide:

The !php/object: tag was removed in favor of the !php/object tag (without the colon).
The !php/const: tag was removed in favor of the !php/const tag (without the colon).

As mentioned in the [upgrade guide](https://github.com/symfony/symfony/blob/master/UPGRADE-4.0.md):> The !php/object: tag was removed in favor of the !php/object tag (without the colon).> The !php/const: tag was removed in favor of the !php/const tag (without the colon).
Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

Nice! Jérôme, thanks for fixing this.

@xabbuh please review if this change was made only for Symfony 4 or also for Symfony 3.4. Thanks!


$dumped = Yaml::dump($object, 2, 4, Yaml::DUMP_OBJECT);
// !php/object:O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}
// !php/objectO:8:"stdClass":1:{s:5:"foo";s:7:"bar";}
Copy link
Member

Choose a reason for hiding this comment

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

this should be// !php/object 'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}'

flag::

$yaml = '!php/object:O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}';
$yaml = '!php/objectO:8:"stdClass":1:{s:5:"foo";s:7:"bar";}';
Copy link
Member

Choose a reason for hiding this comment

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

should be$yaml = '!php/object \'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}\'';

@xabbuh
Copy link
Member

xabbuh commentedNov 21, 2017
edited
Loading

3.4 is correct, the old example won't work with Symfony 4, but the tag with colon is already deprecated in 3.4

@jeromemacias
Copy link
ContributorAuthor

@xabbuh Changes done

@weaverryan
Copy link
Member

Thank you Jérôme!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@jeromemacias@xabbuh@weaverryan@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp