We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b377131 + 81b6b8f commit d6b8b97Copy full SHA for d6b8b97
cli/valet.php
@@ -495,7 +495,18 @@
495
*/
496
$app->command('use [phpVersion] [--force]', function ($phpVersion, $force) {
497
if (!$phpVersion) {
498
- return info('Valet is using ' . Brew::linkedPhp());
+ $path = getcwd() . '/.valetphprc';
499
+ $linkedVersion = Brew::linkedPhp();
500
+ if (!file_exists($path)) {
501
+ return info(sprintf('Valet is using %s.', $linkedVersion));
502
+ }
503
+
504
+ $phpVersion = trim(file_get_contents($path));
505
+ info('Found \'' . $path . '\' specifying version: ' . $phpVersion);
506
507
+ if ($linkedVersion == $phpVersion) {
508
+ return info(sprintf('Valet is already using %s.', $linkedVersion));
509
510
}
511
512
PhpFpm::validateRequestedVersion($phpVersion);
0 commit comments