1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

Drop PHP 5.6; extract site-specific PHP version isolation to its own commands

This commit is contained in:
Matt Stauffer
2022-03-12 00:05:51 -05:00
parent a34073efed
commit eefc06b07f
12 changed files with 156 additions and 152 deletions

View File

@@ -704,9 +704,10 @@ public function buildSecureNginxServer($url, $siteConf = null)
* @param string $phpVersion
* @return void
*/
public function installSiteConfig($valetSite, $fpmSockName, $phpVersion)
public function isolate($valetSite, $fpmSockName, $phpVersion)
{
if ($this->files->exists($this->nginxPath($valetSite))) {
// Modify the existing config if it exists (likely because it's secured)
$siteConf = $this->files->get($this->nginxPath($valetSite));
$siteConf = $this->replaceSockFile($siteConf, $fpmSockName, $phpVersion);
} else {
@@ -768,7 +769,7 @@ public function unsecure($url)
// If the user had isolated the PHP version for this site, swap out .sock file
if ($phpVersion) {
$this->installSiteConfig($url, "valet{$phpVersion}.sock", $phpVersion);
$this->isolate($url, "valet{$phpVersion}.sock", $phpVersion);
}
}