Skip to content

Remove skipped test checks for symfony/yaml bug #133

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

Closed
cebe opened this issue Oct 28, 2021 · 2 comments · Fixed by #136
Closed

Remove skipped test checks for symfony/yaml bug #133

cebe opened this issue Oct 28, 2021 · 2 comments · Fixed by #136
Labels
Milestone

Comments

@cebe
Copy link
Owner

cebe commented Oct 28, 2021

Symfony bug symfony/symfony#34805 seems to be fixed so we should be able to remove these checks:

// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
$installed = json_decode(file_get_contents(__DIR__ . '/../vendor/composer/installed.json'), true);
// Check for composer 2.0 structure
if (array_key_exists('packages', $installed)) {
$installed = $installed['packages'];
}
foreach($installed as $pkg) {
if ($pkg['name'] === 'symfony/yaml' && version_compare($pkg['version'], 'v4.4', '>=')) {
$this->markTestSkipped(
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805'
);
}
}

// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
if ($openApiFile === 'oai/openapi-specification/examples/v3.0/uspto.yaml') {
$installed = json_decode(file_get_contents(__DIR__ . '/../../vendor/composer/installed.json'), true);
// Check for composer 2.0 structure
if (array_key_exists('packages', $installed)) {
$installed = $installed['packages'];
}
foreach ($installed as $pkg) {
if ($pkg['name'] === 'symfony/yaml' && version_compare($pkg['version'], 'v4.4', '>=')) {
$this->markTestSkipped(
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805'
);
}
}
}

@cebe cebe added good first issue Good for newcomers hacktoberfest labels Oct 28, 2021
@cebe cebe added this to the 1.6.0 milestone Oct 28, 2021
@polkabunny
Copy link

Hi there, I can take a look if it's just removing the tests. Do they need to be replaced with anything?

@cebe
Copy link
Owner Author

cebe commented Oct 28, 2021

sorry for the weird wording, this is not about removing the test itself but remove the check for the symfony version which skips the test in certain setups. So now the test should run in all cases.

TODO:

  • remove the check for symfony/yaml version, so that test always runs
  • check if it is green on all versions of symfony/yaml that we run tests against (see github action checks)
  • nothing to to if all is green
  • need to check what is wrong if tests are still failing.

@cebe cebe changed the title Remove skipped test Remove skipped test checks for symfony/yaml bug Oct 28, 2021
@simPod simPod mentioned this issue Dec 2, 2021
@cebe cebe closed this as completed in #136 Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants