File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
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 /**
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ function restart()
9595 */
9696 function stop ()
9797 {
98- $ this ->brew ->stopService ('php56 ' , 'php70 ' , 'php71 ' );
98+ $ this ->brew ->stopService ('php56 ' , 'php70 ' , 'php71 ' , ' php72 ' );
9999 }
100100
101101 /**
@@ -106,6 +106,7 @@ function stop()
106106 function fpmConfigPath ()
107107 {
108108 $ confLookup = [
109+ 'php72 ' => '/usr/local/etc/php/7.2/php-fpm.d/www.conf ' ,
109110 'php71 ' => '/usr/local/etc/php/7.1/php-fpm.d/www.conf ' ,
110111 'php70 ' => '/usr/local/etc/php/7.0/php-fpm.d/www.conf ' ,
111112 'php56 ' => '/usr/local/etc/php/5.6/php-fpm.conf ' ,
You can’t perform that action at this time.
0 commit comments