From 7622357ff1552e8fe0cec5387dd50d825bba85e4 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 24 Oct 2022 03:35:44 +0530 Subject: [PATCH] Improve phalcon5 support --- src/scripts/extensions/phalcon.ps1 | 7 +++---- src/scripts/extensions/phalcon.sh | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/scripts/extensions/phalcon.ps1 b/src/scripts/extensions/phalcon.ps1 index 2b549af0..d8954760 100644 --- a/src/scripts/extensions/phalcon.ps1 +++ b/src/scripts/extensions/phalcon.ps1 @@ -25,10 +25,9 @@ Function Add-PhalconFromGitHub() { } # Function to install phalcon Function Add-PhalconHelper() { - if ($extension_version -eq '5') { - Add-PhalconFromGitHub -Semver (Get-PeclPackageVersion phalcon 5 snapshot stable | Select-Object -First 1) - } elseif ($extension_version -eq '4') { - Install-Phpextension -Extension phalcon -MinimumStability stable -Path $php_dir + if (($extension_version -eq '4') -or ($extension_version -eq '5')) { + $extension_semver=Get-PeclPackageVersion phalcon $extension_version stable stable | Select-Object -First 1 + Add-Extension -Extension phalcon -Stability stable -Extension_version $extension_semver } elseif ($extension_version -eq '3') { Add-PhalconFromGitHub -Semver 3.4.5 } diff --git a/src/scripts/extensions/phalcon.sh b/src/scripts/extensions/phalcon.sh index 4f2109be..d17d12a6 100644 --- a/src/scripts/extensions/phalcon.sh +++ b/src/scripts/extensions/phalcon.sh @@ -1,8 +1,7 @@ # Helper function to get phalcon version get_phalcon_version() { if [ "$extension" = "phalcon5" ]; then - semver="$(get_pecl_version phalcon stable 5)" - ([ -n "$semver" ] && echo "$semver") || get_pecl_version phalcon rc 5 + get_pecl_version phalcon stable 5 elif [ "$extension" = "phalcon4" ]; then echo '4.1.3' elif [ "$extension" = "phalcon3" ]; then