Improve phalcon5 support

This commit is contained in:
Shivam Mathur 2022-10-24 03:35:44 +05:30
parent 6652a09da6
commit 7622357ff1
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 4 additions and 6 deletions

View File

@ -25,10 +25,9 @@ Function Add-PhalconFromGitHub() {
} }
# Function to install phalcon # Function to install phalcon
Function Add-PhalconHelper() { Function Add-PhalconHelper() {
if ($extension_version -eq '5') { if (($extension_version -eq '4') -or ($extension_version -eq '5')) {
Add-PhalconFromGitHub -Semver (Get-PeclPackageVersion phalcon 5 snapshot stable | Select-Object -First 1) $extension_semver=Get-PeclPackageVersion phalcon $extension_version stable stable | Select-Object -First 1
} elseif ($extension_version -eq '4') { Add-Extension -Extension phalcon -Stability stable -Extension_version $extension_semver
Install-Phpextension -Extension phalcon -MinimumStability stable -Path $php_dir
} elseif ($extension_version -eq '3') { } elseif ($extension_version -eq '3') {
Add-PhalconFromGitHub -Semver 3.4.5 Add-PhalconFromGitHub -Semver 3.4.5
} }

View File

@ -1,8 +1,7 @@
# Helper function to get phalcon version # Helper function to get phalcon version
get_phalcon_version() { get_phalcon_version() {
if [ "$extension" = "phalcon5" ]; then if [ "$extension" = "phalcon5" ]; then
semver="$(get_pecl_version phalcon stable 5)" get_pecl_version phalcon stable 5
([ -n "$semver" ] && echo "$semver") || get_pecl_version phalcon rc 5
elif [ "$extension" = "phalcon4" ]; then elif [ "$extension" = "phalcon4" ]; then
echo '4.1.3' echo '4.1.3'
elif [ "$extension" = "phalcon3" ]; then elif [ "$extension" = "phalcon3" ]; then