Reuse the PHP Windows download URL

This commit is contained in:
Shivam Mathur
2026-08-29 23:24:25 +05:30
parent 3cd644eeae
commit b8123f29e1
+3 -2
View File
@@ -282,7 +282,7 @@ Function Add-PhpConfig {
Function Set-PhpCache { Function Set-PhpCache {
try { try {
$asset = Get-PhpReleaseAsset -Type php $asset = Get-PhpReleaseAsset -Type php
Get-File -Url $php_builder/releases/download/php$version/$asset -FallbackUrl https://downloads.php.net/~windows/releases/archives/$asset -OutFile $php_dir\$asset Get-File -Url $php_builder/releases/download/php$version/$asset -FallbackUrl $php_windows/releases/archives/$asset -OutFile $php_dir\$asset
Set-PhpDownloadCache -Path $php_dir CurrentUser Set-PhpDownloadCache -Path $php_dir CurrentUser
} catch { } } catch { }
} }
@@ -291,7 +291,7 @@ Function Set-PhpCache {
Function Add-DebugSymbols { Function Add-DebugSymbols {
$stability = if ($version -match $nightly_versions) { 'dev' } else { 'stable' } $stability = if ($version -match $nightly_versions) { 'dev' } else { 'stable' }
$asset = Get-PhpReleaseAsset -Type debug -Stability $stability $asset = Get-PhpReleaseAsset -Type debug -Stability $stability
Get-File -Url $php_builder/releases/download/php$version/$asset -FallbackUrl https://downloads.php.net/~windows/releases/archives/$asset -OutFile $php_dir\$asset Get-File -Url $php_builder/releases/download/php$version/$asset -FallbackUrl $php_windows/releases/archives/$asset -OutFile $php_dir\$asset
Expand-Archive -Path $php_dir\$asset -DestinationPath $php_dir -Force Expand-Archive -Path $php_dir\$asset -DestinationPath $php_dir -Force
Get-ChildItem -Path $php_dir -Filter php_*.pdb | Move-Item -Destination $ext_dir Get-ChildItem -Path $php_dir -Filter php_*.pdb | Move-Item -Destination $ext_dir
} }
@@ -314,6 +314,7 @@ $ext_dir = "$php_dir\ext"
$bin_dir = $php_dir $bin_dir = $php_dir
$github = 'https://github.com' $github = 'https://github.com'
$php_builder = "$github/shivammathur/php-builder-windows" $php_builder = "$github/shivammathur/php-builder-windows"
$php_windows = 'https://downloads.php.net/~windows'
$php_manifest = $null $php_manifest = $null
$current_profile = "$env:TEMP\setup-php.ps1" $current_profile = "$env:TEMP\setup-php.ps1"
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'