Skip to content

Commit 0dc3306

Browse files
committed
Fix phalcon5 support on Windows
1 parent 680a983 commit 0dc3306

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

src/scripts/extensions/phalcon.ps1

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,6 @@ Function Get-PhalconReleaseAssetUrl() {
1919
$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)"
2020
} catch { }
2121
}
22-
} else {
23-
$nts = if (!$installed.ThreadSafe) { "-nts" } else { "-ts" }
24-
try {
25-
$match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(php_phalcon-php${version}${nts}-windows.*-x64.zip)"
26-
} catch { }
27-
if($null -eq $match) {
28-
try {
29-
$match = (Get-File -Url "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(php_phalcon-php${version}${nts}-windows.*-x64.zip)"
30-
} catch { }
31-
}
32-
if($null -eq $match) {
33-
try {
34-
$match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(phalcon-php${version}${nts}-windows.*-x64.zip)"
35-
} catch { }
36-
}
37-
if($null -eq $match) {
38-
try {
39-
$match = (Get-File -Url "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(phalcon-php${version}${nts}-windows.*-x64.zip)"
40-
} catch { }
41-
}
4222
}
4323
if($NULL -ne $match) {
4424
return "$github/$releases/download/v$Semver/$($match.Matches[0].Groups[1].Value)"
@@ -82,7 +62,7 @@ Function Get-PhalconSemver() {
8262
# Function to install phalcon
8363
Function Add-PhalconHelper() {
8464
$semver = Get-PhalconSemver
85-
if ($extension_version -eq '3') {
65+
if ($extension_version -match '[3-4]') {
8666
Add-PhalconFromGitHub $semver
8767
} else {
8868
Add-Extension -Extension phalcon -Stability stable -Extension_version $semver

0 commit comments

Comments
 (0)