@@ -54,23 +54,6 @@ public function print(Output $output): void
54
54
$ phpRuntimeVersion ->getVersionString (),
55
55
));
56
56
57
- $ minComposerPhpVersion = $ this ->composerPhpVersionFactory ->getMinVersion ();
58
- $ maxComposerPhpVersion = $ this ->composerPhpVersionFactory ->getMaxVersion ();
59
- if ($ minComposerPhpVersion !== null && $ maxComposerPhpVersion !== null ) {
60
- if ($ minComposerPhpVersion ->getVersionId () !== $ maxComposerPhpVersion ->getVersionId ()) {
61
- $ output ->writeLineFormatted (sprintf (
62
- '<info>PHP composer.json required version:</info> %s-%s ' ,
63
- $ minComposerPhpVersion ->getVersionString (),
64
- $ maxComposerPhpVersion ->getVersionString (),
65
- ));
66
- } else {
67
- $ output ->writeLineFormatted (sprintf (
68
- '<info>PHP composer.json required version:</info> %s ' ,
69
- $ minComposerPhpVersion ->getVersionString (),
70
- ));
71
- }
72
- }
73
-
74
57
if (
75
58
$ this ->phpVersion ->getSource () === PhpVersion::SOURCE_CONFIG
76
59
&& is_array ($ this ->configPhpVersion )
@@ -86,6 +69,23 @@ public function print(Output $output): void
86
69
));
87
70
88
71
} else {
72
+ $ minComposerPhpVersion = $ this ->composerPhpVersionFactory ->getMinVersion ();
73
+ $ maxComposerPhpVersion = $ this ->composerPhpVersionFactory ->getMaxVersion ();
74
+ if ($ minComposerPhpVersion !== null && $ maxComposerPhpVersion !== null ) {
75
+ if ($ minComposerPhpVersion ->getVersionId () !== $ maxComposerPhpVersion ->getVersionId ()) {
76
+ $ output ->writeLineFormatted (sprintf (
77
+ '<info>PHP composer.json required version:</info> %s-%s ' ,
78
+ $ minComposerPhpVersion ->getVersionString (),
79
+ $ maxComposerPhpVersion ->getVersionString (),
80
+ ));
81
+ } else {
82
+ $ output ->writeLineFormatted (sprintf (
83
+ '<info>PHP composer.json required version:</info> %s ' ,
84
+ $ minComposerPhpVersion ->getVersionString (),
85
+ ));
86
+ }
87
+ }
88
+
89
89
$ output ->writeLineFormatted (sprintf (
90
90
'<info>PHP version for analysis:</info> %s (from %s) ' ,
91
91
$ this ->phpVersion ->getVersionString (),
0 commit comments