From 0dc33069a3efc2221a413ce8386b2035b8ee4a00 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 14 May 2026 00:06:23 +0530 Subject: [PATCH] Fix phalcon5 support on Windows --- src/scripts/extensions/phalcon.ps1 | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/scripts/extensions/phalcon.ps1 b/src/scripts/extensions/phalcon.ps1 index 9f47382c..46107203 100644 --- a/src/scripts/extensions/phalcon.ps1 +++ b/src/scripts/extensions/phalcon.ps1 @@ -19,26 +19,6 @@ Function Get-PhalconReleaseAssetUrl() { $match = (Get-File -Url "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(phalcon_${arch}_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)" } catch { } } - } else { - $nts = if (!$installed.ThreadSafe) { "-nts" } else { "-ts" } - try { - $match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(php_phalcon-php${version}${nts}-windows.*-x64.zip)" - } catch { } - if($null -eq $match) { - try { - $match = (Get-File -Url "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(php_phalcon-php${version}${nts}-windows.*-x64.zip)" - } catch { } - } - if($null -eq $match) { - try { - $match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(phalcon-php${version}${nts}-windows.*-x64.zip)" - } catch { } - } - if($null -eq $match) { - try { - $match = (Get-File -Url "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(phalcon-php${version}${nts}-windows.*-x64.zip)" - } catch { } - } } if($NULL -ne $match) { return "$github/$releases/download/v$Semver/$($match.Matches[0].Groups[1].Value)" @@ -82,7 +62,7 @@ Function Get-PhalconSemver() { # Function to install phalcon Function Add-PhalconHelper() { $semver = Get-PhalconSemver - if ($extension_version -eq '3') { + if ($extension_version -match '[3-4]') { Add-PhalconFromGitHub $semver } else { Add-Extension -Extension phalcon -Stability stable -Extension_version $semver