Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix YAML related tests #6478

Merged
merged 2 commits into from May 30, 2017
Merged

Fix YAML related tests #6478

merged 2 commits into from May 30, 2017

Conversation

@lcobucci
Copy link
Member

lcobucci commented May 30, 2017

Symfony dropped the implicit conversion so we need to do it by ourselves 馃槈

We had duplicated keys and that's no longer valid on symfony/yaml 3.3.
@lcobucci lcobucci self-assigned this May 30, 2017
@lcobucci lcobucci requested a review from Ocramius May 30, 2017
@lcobucci lcobucci added this to the 2.6.0 milestone May 30, 2017
@@ -135,7 +135,6 @@ Doctrine\Tests\Models\CMS\CmsUser:
name: address_id
referencedColumnName: id
cascade: [ persist ]
oneToOne:

This comment has been minimized.

Copy link
@mikeSimonson

mikeSimonson May 30, 2017

Contributor

Why is that key removed ?

This comment has been minimized.

Copy link
@lcobucci

lcobucci May 30, 2017

Author Member

It's duplicated and the parser now complains

This comment has been minimized.

Copy link
@mikeSimonson

mikeSimonson May 30, 2017

Contributor

seems good to go to me then

This comment has been minimized.

Copy link
@lcobucci

lcobucci May 30, 2017

Author Member

thanks 馃槈

@@ -52,7 +52,6 @@ Doctrine\Tests\Models\Company\CompanyPerson:
name: address_id
referencedColumnName: id
cascade: [ persist ]
oneToOne:

This comment has been minimized.

Copy link
@mikeSimonson

mikeSimonson May 30, 2017

Contributor

Same as above ?

$flags = 0;
if (defined(Yaml::class . '::PARSE_KEYS_AS_STRINGS')) {
$flags = Yaml::PARSE_KEYS_AS_STRINGS;

This comment has been minimized.

Copy link
@Ocramius

Ocramius May 30, 2017

Member

return Yaml::parse(file_get_contents($file), Yaml::PARSE_KEYS_AS_STRINGS);

$flags = Yaml::PARSE_KEYS_AS_STRINGS;
}
return Yaml::parse(file_get_contents($file), $flags);

This comment has been minimized.

Copy link
@Ocramius

Ocramius May 30, 2017

Member

return Yaml::parse(file_get_contents($file), 0);

Since Symfony 3.3 implicit conversion is not enabled by default so we
need to pass that flag manually.

Related to: symfony/symfony#21774
@lcobucci lcobucci force-pushed the lcobucci:fix-yaml-tests branch from a366c2c to f9062d9 May 30, 2017
@lcobucci

This comment has been minimized.

Copy link
Member Author

lcobucci commented May 30, 2017

@Ocramius fixed, thanks

@Ocramius Ocramius assigned Ocramius and unassigned lcobucci May 30, 2017
@Ocramius

This comment has been minimized.

Copy link
Member

Ocramius commented May 30, 2017

Green! 馃殺

@Ocramius Ocramius merged commit 205ee72 into doctrine:master May 30, 2017
2 checks passed
2 checks passed
Scrutinizer 1 new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lcobucci lcobucci deleted the lcobucci:fix-yaml-tests branch May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.