@@ -326,24 +326,15 @@ private function assertDependsOnFramework(\StdClass $json)
326
326
private function assertPhpVersionInSync ($ name , $ phpVersion )
327
327
{
328
328
if (isset (self ::$ rootJson ['require ' ]['php ' ])) {
329
- if ($ this ->isVendorMagento ($ name )) {
330
- $ this ->assertEquals (
331
- self ::$ rootJson ['require ' ]['php ' ],
332
- $ phpVersion ,
333
- "PHP version {$ phpVersion } in component {$ name } is inconsistent with version "
334
- . self ::$ rootJson ['require ' ]['php ' ] . ' in root composer.json '
335
- );
336
- } else {
337
- $ composerVersionsPattern = '{\s*\|\|?\s*} ' ;
338
- $ rootPhpVersions = preg_split ($ composerVersionsPattern , self ::$ rootJson ['require ' ]['php ' ]);
339
- $ modulePhpVersions = preg_split ($ composerVersionsPattern , $ phpVersion );
340
-
341
- $ this ->assertEmpty (
342
- array_diff ($ rootPhpVersions , $ modulePhpVersions ),
343
- "PHP version {$ phpVersion } in component {$ name } is inconsistent with version "
344
- . self ::$ rootJson ['require ' ]['php ' ] . ' in root composer.json '
345
- );
346
- }
329
+ $ composerVersionsPattern = '{\s*\|\|?\s*} ' ;
330
+ $ rootPhpVersions = preg_split ($ composerVersionsPattern , self ::$ rootJson ['require ' ]['php ' ]);
331
+ $ modulePhpVersions = preg_split ($ composerVersionsPattern , $ phpVersion );
332
+
333
+ $ this ->assertEmpty (
334
+ array_diff ($ rootPhpVersions , $ modulePhpVersions ),
335
+ "PHP version {$ phpVersion } in component {$ name } is inconsistent with version "
336
+ . self ::$ rootJson ['require ' ]['php ' ] . ' in root composer.json '
337
+ );
347
338
}
348
339
}
349
340
0 commit comments