mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
refactor code & tests
This commit is contained in:
@@ -564,7 +564,7 @@
|
||||
/**
|
||||
* Get PHP Birnary
|
||||
*/
|
||||
$app->command('which-php [site]', function ($site = null) {
|
||||
$app->command('which-php [site] [--skip-cache]', function ($site, $skipCache) {
|
||||
$host = Site::host($site ?: getcwd()).'.'.Configuration::read()['tld'];
|
||||
$phpVersion = Site::customPhpVersion($host);
|
||||
|
||||
@@ -577,9 +577,10 @@
|
||||
|
||||
$phpVersion = $phpVersion ? PhpFpm::normalizePhpVersion($phpVersion) : null;
|
||||
|
||||
return output(Brew::getPhpBinaryPath($phpVersion));
|
||||
return output(Brew::whichPhp($phpVersion, $skipCache));
|
||||
})->descriptions('Get the PHP binary path for a given site', [
|
||||
'site' => 'The site to get the PHP binary path for',
|
||||
'--skip-cache' => 'Force a re-check of the PHP binary path',
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user