Fix phalcon support

This commit is contained in:
Shivam Mathur 2023-12-07 08:15:34 +05:30
parent e8cd65f444
commit 131ba03b0d
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 8 additions and 7 deletions

6
dist/index.js vendored
View File

@ -252,7 +252,7 @@ async function addExtensionDarwin(extension_csv, version) {
case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5?/.test(version_extension):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-2])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
add_script += await utils.customPackage(ext_name, 'extensions', extension, 'darwin');
@ -302,7 +302,7 @@ async function addExtensionWindows(extension_csv, version) {
case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5?$/.test(version_extension):
case /^(7\.[1-4]|8\.1)(pecl_)?http/.test(version_extension):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-2])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
@ -372,7 +372,7 @@ async function addExtensionLinux(extension_csv, version) {
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5?$/.test(version_extension):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-2])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
add_script += await utils.customPackage(ext_name, 'extensions', extension, 'linux');

View File

@ -46,7 +46,7 @@ export async function addExtensionDarwin(
extension
):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5/.test(
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5?/.test(
version_extension
):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
@ -146,7 +146,7 @@ export async function addExtensionWindows(
):
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5?$/.test(
version_extension
):
case /^(7\.[1-4]|8\.1)(pecl_)?http/.test(version_extension):
@ -283,7 +283,7 @@ export async function addExtensionLinux(
):
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5?$/.test(
version_extension
):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):

View File

@ -31,7 +31,7 @@ add_phalcon_helper() {
else
package="php${version:?}-$extension"
add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
[ "$extension" = "phalcon4" ] && (install_packages "php${version:?}-psr" || pecl_install psr || pecl_install psr-1.1.0)
[[ "$extension" =~ phalcon[4|5] ]] && (install_packages "php${version:?}-psr" || pecl_install psr || pecl_install psr-1.1.0)
(check_package "$package" && install_packages "$package") || pecl_install phalcon-"$(get_phalcon_version)" || add_phalcon_from_repo
fi
}
@ -87,6 +87,7 @@ add_phalcon5() {
add_phalcon() {
local extension=$1
status='Enabled'
[ "$extension" = "phalcon" ] && extension=phalcon5
extension_major_version=${extension: -1}
if [[ "$extension_major_version" =~ [3-5] ]]; then
add_phalcon"$extension_major_version" >/dev/null 2>&1