File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
setup/src/Magento/Setup/Controller Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,13 @@ public function phpVersionAction()
66
66
);
67
67
}
68
68
$ multipleConstraints = $ this ->versionParser ->parseConstraints ($ requiredVersion );
69
- $ currentPhpVersion = $ this ->versionParser ->parseConstraints (PHP_VERSION );
69
+ try {
70
+ $ normalizedPhpVersion = $ this ->versionParser ->normalize (PHP_VERSION );
71
+ } catch (\UnexpectedValueException $ e ) {
72
+ $ prettyVersion = preg_replace ('#^([^~+-]+).*$# ' , '$1 ' , PHP_VERSION );
73
+ $ normalizedPhpVersion = $ this ->versionParser ->normalize ($ prettyVersion );
74
+ }
75
+ $ currentPhpVersion = $ this ->versionParser ->parseConstraints ($ normalizedPhpVersion );
70
76
$ responseType = ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ;
71
77
if (!$ multipleConstraints ->matches ($ currentPhpVersion )) {
72
78
$ responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR ;
You can’t perform that action at this time.
0 commit comments