Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions tests/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,8 @@ private function assertApiContent(\cebe\openapi\spec\OpenApi $openapi)
$this->assertEquals("1.0.0", $openapi->info->version);
}

/**
* @see https://github.com/symfony/symfony/issues/34805
*/
public function testSymfonyYamlBugHunt()
{
// 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'
);
}
}

$openApiFile = __DIR__ . '/../vendor/oai/openapi-specification/examples/v3.0/uspto.yaml';
$openapi = \cebe\openapi\Reader::readFromYamlFile($openApiFile);

Expand Down
16 changes: 0 additions & 16 deletions tests/spec/OpenApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,6 @@ public function specProvider()
*/
public function testSpecs($openApiFile)
{
// 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'
);
}
}
}

if (strtolower(substr($openApiFile, -5, 5)) === '.json') {
$json = json_decode(file_get_contents(__DIR__ . '/../../vendor/' . $openApiFile), true);
$openapi = new OpenApi($json);
Expand Down