-
-
Notifications
You must be signed in to change notification settings - Fork 912
Fix/2.0 tests #1183
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
Fix/2.0 tests #1183
Conversation
soyuka
commented
Jun 16, 2017
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | na |
License | MIT |
Doc PR | na |
@@ -32,7 +32,7 @@ | ||
protected function extractPath(string $path) | ||
{ | ||
try { | ||
$resourcesYaml = Yaml::parse(file_get_contents($path)); | ||
$resourcesYaml = Yaml::parse(file_get_contents($path), Yaml::PARSE_KEYS_AS_STRINGS); |
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.
Not sure about this one, @meyerbaptiste is this correct? Thanks!
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.
Yes it's correct, but this constant was introduced in symfony/yaml
3.3
. So tests will fail with the --prefer-lowest
argument!
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.
Hmm, what solution do we have if we want tests to pass on 2.0 then?
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.
I could mark tests as legacy but doesn't feel clean enough.
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.
IIRC, using this constant is deprecated, the user should use quotes instead.
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.
hmm okay maybe I need to fix yaml files instead then.
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.
IIRC, using this constant is deprecated
Are you sure? I can't find any information about this subject and I don't see anything in the code of the component.
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.
Anyway, fixing the actual issue in the yaml seems to be the way to go.
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.
ab35851
to
5ae8472
Compare
@@ -32,7 +32,7 @@ resources: | ||
attributes: | ||
'foo': ['Foo'] | ||
'bar': | ||
0: ['Bar'] | ||
'0': ['Bar'] |
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.
thanks @dunglas 😄
Fix/2.0 tests