diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index be4d351b..21a69e67 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -43,7 +43,7 @@ pecl_install() { # Function to get the PECL version get_pecl_version() { extension=$1 - stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot)")" + stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot|preview)")" pecl_rest='https://pecl.php.net/rest/r/' response=$(curl "${curl_opts[@]}" "$pecl_rest$extension"/allreleases.xml) pecl_version=$(echo "$response" | grep -m 1 -Eio "(\d*\.\d*\.\d*$stability\d*)") @@ -58,7 +58,7 @@ add_pecl_extension() { extension=$1 pecl_version=$2 prefix=$3 - if [[ $pecl_version =~ .*(alpha|beta|rc|snapshot).* ]]; then + if [[ $pecl_version =~ .*(alpha|beta|rc|snapshot|preview).* ]]; then pecl_version=$(get_pecl_version "$extension" "$pecl_version") fi if ! check_extension "$extension" && [ -e "$ext_dir/$extension.so" ]; then diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 20389473..9156113a 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -49,7 +49,7 @@ configure_pecl() { # Function to get the PECL version get_pecl_version() { extension=$1 - stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot)")" + stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot|preview)")" pecl_rest='https://pecl.php.net/rest/r/' response=$(curl "${curl_opts[@]}" "$pecl_rest$extension"/allreleases.xml) pecl_version=$(echo "$response" | grep -m 1 -Pio "(\d*\.\d*\.\d*$stability\d*)") @@ -120,7 +120,7 @@ add_pecl_extension() { extension=$1 pecl_version=$2 prefix=$3 - if [[ $pecl_version =~ .*(alpha|beta|rc|snapshot).* ]]; then + if [[ $pecl_version =~ .*(alpha|beta|rc|snapshot|preview).* ]]; then pecl_version=$(get_pecl_version "$extension" "$pecl_version") fi if ! check_extension "$extension" && [ -e "$ext_dir/$extension.so" ]; then