mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Add support for PHP 8.1 on Windows
This commit is contained in:
parent
6fc20c9b7f
commit
9205a596c9
@ -309,7 +309,7 @@ $ext_dir = "$php_dir\ext"
|
||||
$bin_dir = $php_dir
|
||||
$current_profile = "$env:TEMP\setup-php.ps1"
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
$master_version = '8.0'
|
||||
$nightly_version = '8.[0-9]'
|
||||
$cert_source='CurrentUser'
|
||||
|
||||
$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') {
|
||||
Install-Module -Name VcRedist -Force
|
||||
}
|
||||
if ($version -eq $master_version) {
|
||||
$version = 'master'
|
||||
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-PhpMaster.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir
|
||||
if ($version -match $nightly_version) {
|
||||
Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/Install-PhpNightly.ps1 -OutFile $php_dir\Install-PhpNightly.ps1 > $null 2>&1
|
||||
& $php_dir\Install-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
|
||||
} else {
|
||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user