1
0
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:
James Doyle
2018-04-03 07:06:10 -07:00
committed by Taylor Otwell
parent be8fb05110
commit 7f61475feb
2 changed files with 4 additions and 2 deletions

View File

@@ -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.");
});

View File

@@ -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];
}
}