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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user