mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
fix changes where brew php paths now include @ and semver-style versions in paths (#545)
This commit is contained in:
committed by
Taylor Otwell
parent
be8fb05110
commit
7f61475feb
@@ -182,7 +182,7 @@ function linkedPhp()
|
||||
$resolvedPath = $this->files->readLink('/usr/local/bin/php');
|
||||
|
||||
return $this->supportedPhpVersions()->first(function ($version) use ($resolvedPath) {
|
||||
return strpos($resolvedPath, "/$version/") !== false;
|
||||
return strpos(preg_replace('/([@|\.])/', '', $resolvedPath, "/$version/")) !== false;
|
||||
}, function () {
|
||||
throw new DomainException("Unable to determine linked PHP.");
|
||||
});
|
||||
|
||||
@@ -113,6 +113,8 @@ function fpmConfigPath()
|
||||
'php56' => '/usr/local/etc/php/5.6/php-fpm.conf',
|
||||
];
|
||||
|
||||
return $confLookup[$this->brew->linkedPhp()];
|
||||
$key = preg_replace('/([@|\.])/', '', $this->brew->linkedPhp());
|
||||
|
||||
return $confLookup[$key];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user