From 52fea29a502eb1edc94a02f70b6a22f1a6789932 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Fri, 4 Sep 2026 11:25:34 +0530 Subject: [PATCH] Run cached PHP install in PhpManager scope --- src/scripts/win32.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index ff8ff649..c01f16be 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -284,8 +284,12 @@ Function Install-PhpFromCache { $url = "$php_builder/releases/download/php$version/$asset" Get-File -Url $url -FallbackUrl $php_windows/releases/archives/$asset -OutFile $php_dir\$asset Set-PhpDownloadCache -Path $php_dir CurrentUser - $php_version = Get-PhpVersionFromUrl -Url $url -ReleaseState Release - Install-PhpFromUrl -Url $url -Path $php_dir -PhpVersion $php_version -InstallVCRedist $true + $php_manager = Get-Module PhpManager + & $php_manager { + param($url, $path) + $php_version = Get-PhpVersionFromUrl -Url $url -ReleaseState Release + Install-PhpFromUrl -Url $url -Path $path -PhpVersion $php_version -InstallVCRedist $true + } $url $php_dir $ini_path = "$php_dir\php.ini" Copy-Item -Path $php_dir\php.ini-production -Destination $ini_path -Force Set-PhpIniKey -Key date.timezone -Value UTC -Path $ini_path