mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-11-04 17:06:37 +07:00 
			
		
		
		
	Add support for PHP 8.1 on Windows
This commit is contained in:
		@ -309,7 +309,7 @@ $ext_dir = "$php_dir\ext"
 | 
				
			|||||||
$bin_dir = $php_dir
 | 
					$bin_dir = $php_dir
 | 
				
			||||||
$current_profile = "$env:TEMP\setup-php.ps1"
 | 
					$current_profile = "$env:TEMP\setup-php.ps1"
 | 
				
			||||||
$ProgressPreference = 'SilentlyContinue'
 | 
					$ProgressPreference = 'SilentlyContinue'
 | 
				
			||||||
$master_version = '8.0'
 | 
					$nightly_version = '8.[0-9]'
 | 
				
			||||||
$cert_source='CurrentUser'
 | 
					$cert_source='CurrentUser'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$arch = 'x64'
 | 
					$arch = 'x64'
 | 
				
			||||||
@ -364,10 +364,9 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
 | 
				
			|||||||
  if ($version -lt '7.0' -and (Get-InstalledModule).Name -notcontains 'VcRedist') {
 | 
					  if ($version -lt '7.0' -and (Get-InstalledModule).Name -notcontains 'VcRedist') {
 | 
				
			||||||
    Install-Module -Name VcRedist -Force
 | 
					    Install-Module -Name VcRedist -Force
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if ($version -eq $master_version) {
 | 
					  if ($version -match $nightly_version) {
 | 
				
			||||||
    $version = 'master'
 | 
					    Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/Install-PhpNightly.ps1 -OutFile $php_dir\Install-PhpNightly.ps1 > $null 2>&1
 | 
				
			||||||
    Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/Install-PhpMaster.ps1 -OutFile $php_dir\Install-PhpMaster.ps1 > $null 2>&1
 | 
					    & $php_dir\Install-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
 | 
				
			||||||
    & $php_dir\Install-PhpMaster.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir
 | 
					 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
 | 
					    Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user