mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Merge pull request #392 from KorvinSzanto/patch-1
Add support for the PHP72 package
This commit is contained in:
@@ -171,15 +171,15 @@ function linkedPhp()
|
||||
|
||||
$resolvedPath = $this->files->readLink('/usr/local/bin/php');
|
||||
|
||||
if (strpos($resolvedPath, 'php71') !== false) {
|
||||
return 'php71';
|
||||
} elseif (strpos($resolvedPath, 'php70') !== false) {
|
||||
return 'php70';
|
||||
} elseif (strpos($resolvedPath, 'php56') !== false) {
|
||||
return 'php56';
|
||||
} else {
|
||||
throw new DomainException("Unable to determine linked PHP.");
|
||||
// Check all currently supported PHP versions
|
||||
$phpVersions = ['php72', 'php71', 'php70', 'php56'];
|
||||
foreach ($phpVersions as $version) {
|
||||
if (strpos($resolvedPath, $version) !== false) {
|
||||
return $version;
|
||||
}
|
||||
}
|
||||
|
||||
throw new DomainException("Unable to determine linked PHP.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,7 +95,7 @@ function restart()
|
||||
*/
|
||||
function stop()
|
||||
{
|
||||
$this->brew->stopService('php56', 'php70', 'php71');
|
||||
$this->brew->stopService('php56', 'php70', 'php71', 'php72');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,6 +106,7 @@ function stop()
|
||||
function fpmConfigPath()
|
||||
{
|
||||
$confLookup = [
|
||||
'php72' => '/usr/local/etc/php/7.2/php-fpm.d/www.conf',
|
||||
'php71' => '/usr/local/etc/php/7.1/php-fpm.d/www.conf',
|
||||
'php70' => '/usr/local/etc/php/7.0/php-fpm.d/www.conf',
|
||||
'php56' => '/usr/local/etc/php/5.6/php-fpm.conf',
|
||||
|
||||
Reference in New Issue
Block a user