mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
Tests for Parallel PHP Version Support
This commit is contained in:
committed by
GitHub
parent
cc41e3c19f
commit
9a5d30bb69
@@ -223,8 +223,12 @@ public function useVersion($version, $force = false, $directory = null)
|
||||
$site = $this->site->getSiteUrl($directory);
|
||||
|
||||
if (! $site) {
|
||||
warning(sprintf("The [%s] site could not be found in Valet's site list.", $directory));
|
||||
return;
|
||||
throw new DomainException(
|
||||
sprintf(
|
||||
"The [%s] site could not be found in Valet's site list.",
|
||||
$directory
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($version == 'default') { // Remove isolation for this site
|
||||
@@ -233,6 +237,7 @@ public function useVersion($version, $force = false, $directory = null)
|
||||
$this->stopIfUnused($oldCustomPhpVersion);
|
||||
$this->nginx->restart();
|
||||
info(sprintf('The site [%s] is now using the default PHP version.', $site));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -263,6 +268,7 @@ public function useVersion($version, $force = false, $directory = null)
|
||||
$this->restart($version);
|
||||
$this->nginx->restart();
|
||||
info(sprintf('The site [%s] is now using %s.', $site, $version));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -424,6 +430,6 @@ public function utilizedPhpVersions()
|
||||
return $this->normalizePhpVersion($phpVersion); // Example output php@7.4
|
||||
}
|
||||
}
|
||||
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->toArray();
|
||||
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->values()->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user