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

Appearance settings

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

Merged
merged 2 commits into from
Jun 16, 2017
Merged

Fix/2.0 tests #1183

merged 2 commits into from
Jun 16, 2017

Conversation

soyuka
Copy link
Member

@soyuka 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);
Copy link
Member Author

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!

Copy link
Member

@meyerbaptiste meyerbaptiste Jun 16, 2017

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!

Copy link
Member Author

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

@meyerbaptiste meyerbaptiste Jun 16, 2017

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.

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

@soyuka soyuka force-pushed the fix/2.0-tests branch 2 times, most recently from ab35851 to 5ae8472 Compare June 16, 2017 09:30
@@ -32,7 +32,7 @@ resources:
attributes:
'foo': ['Foo']
'bar':
0: ['Bar']
'0': ['Bar']
Copy link
Member Author

Choose a reason for hiding this comment

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

thanks @dunglas 😄

@soyuka soyuka merged commit 7305991 into api-platform:2.0 Jun 16, 2017
@soyuka soyuka deleted the fix/2.0-tests branch January 29, 2018 09:38
hoangnd25 pushed a commit to hoangnd25/core that referenced this pull request Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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