File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -171,15 +171,15 @@ function linkedPhp()
171171
172172 $ resolvedPath = $ this ->files ->readLink ('/usr/local/bin/php ' );
173173
174- if (strpos ($ resolvedPath , 'php71 ' ) !== false ) {
175- return 'php71 ' ;
176- } elseif (strpos ($ resolvedPath , 'php70 ' ) !== false ) {
177- return 'php70 ' ;
178- } elseif (strpos ($ resolvedPath , 'php56 ' ) !== false ) {
179- return 'php56 ' ;
180- } else {
181- throw new DomainException ("Unable to determine linked PHP. " );
174+ // Check all currently supported PHP versions
175+ $ phpVersions = ['php72 ' , 'php71 ' , 'php70 ' , 'php56 ' ];
176+ foreach ($ phpVersions as $ version ) {
177+ if (strpos ($ resolvedPath , $ version ) !== false ) {
178+ return $ version ;
179+ }
182180 }
181+
182+ throw new DomainException ("Unable to determine linked PHP. " );
183183 }
184184
185185 /**
You can’t perform that action at this time.
0 commit comments