File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,12 @@ public function testSymfonyYamlBugHunt()
96
96
{
97
97
// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
98
98
$ installed = json_decode (file_get_contents (__DIR__ . '/../vendor/composer/installed.json ' ), true );
99
+ // Check for composer 2.0 structure
100
+ if (array_key_exists ('packages ' , $ installed )) {
101
+ $ installed = $ installed ['packages ' ];
102
+ }
99
103
foreach ($ installed as $ pkg ) {
100
- if ($ pkg ['name ' ] === 'symfony/yaml ' && strncmp ($ pkg ['version_normalized ' ], '5.0 ' , 3 ) === 0 ) {
104
+ if ($ pkg ['name ' ] === 'symfony/yaml ' && version_compare ($ pkg ['version ' ], 'v4.4 ' , ' >= ' ) ) {
101
105
$ this ->markTestSkipped (
102
106
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805 '
103
107
);
Original file line number Diff line number Diff line change @@ -186,8 +186,12 @@ public function testSpecs($openApiFile)
186
186
// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
187
187
if ($ openApiFile === 'oai/openapi-specification/examples/v3.0/uspto.yaml ' ) {
188
188
$ installed = json_decode (file_get_contents (__DIR__ . '/../../vendor/composer/installed.json ' ), true );
189
+ // Check for composer 2.0 structure
190
+ if (array_key_exists ('packages ' , $ installed )) {
191
+ $ installed = $ installed ['packages ' ];
192
+ }
189
193
foreach ($ installed as $ pkg ) {
190
- if ($ pkg ['name ' ] === 'symfony/yaml ' && strncmp ($ pkg ['version_normalized ' ], '5.0 ' , 3 ) === 0 ) {
194
+ if ($ pkg ['name ' ] === 'symfony/yaml ' && version_compare ($ pkg ['version ' ], 'v4.4 ' , ' >= ' ) ) {
191
195
$ this ->markTestSkipped (
192
196
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805 '
193
197
);
You can’t perform that action at this time.
0 commit comments