File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,21 @@ matrix:
4
4
include :
5
5
# linux tests
6
6
- php : ' 7.1'
7
- env : YAML=^3.0
7
+ env : YAML=^3.4
8
8
- php : ' 7.1'
9
9
env : YAML=~4.3.0
10
10
- php : ' 7.2'
11
- env : YAML=^3.0
11
+ env : YAML=^3.4
12
12
- php : ' 7.2'
13
13
env : YAML=~4.3.0
14
14
- php : ' 7.3'
15
- env : YAML=^3.0
15
+ env : YAML=^3.4
16
16
- php : ' 7.3'
17
17
env : YAML=~4.3.0
18
18
- php : ' 7.3'
19
19
env : YAML=^5.0
20
20
- php : ' 7.4'
21
- env : YAML=^3.0
21
+ env : YAML=^3.4
22
22
- php : ' 7.4'
23
23
env : YAML=~4.3.0
24
24
- php : ' 7.4'
Original file line number Diff line number Diff line change 20
20
"require" : {
21
21
"php" : " >=7.1.0" ,
22
22
"ext-json" : " *" ,
23
- "symfony/yaml" : " ^3.0 | ^4.0 | ^5.0" ,
23
+ "symfony/yaml" : " ^3.4 | ^4.0 | ^5.0" ,
24
24
"justinrainbow/json-schema" : " ^5.0"
25
25
},
26
26
"require-dev" : {
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