Add support for PHP 8.1 on Windows

This commit is contained in:
Shivam Mathur 2020-10-15 21:21:01 +05:30
parent 6fc20c9b7f
commit 9205a596c9
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -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
}