diff --git a/src/scripts/ext/blackfire.ps1 b/src/scripts/ext/blackfire.ps1 index cca3e4c6..49a9e04a 100644 --- a/src/scripts/ext/blackfire.ps1 +++ b/src/scripts/ext/blackfire.ps1 @@ -10,7 +10,11 @@ Function Add-Blackfire() { $no_dot_version = $version.replace('.', '') $extension_version = $extension.split('-')[1] if ($extension_version -notmatch "\S") { - $extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php + if($version -lt '7.0') { + $extension_version = '1.50.0' + } else { + $extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php + } } if (Test-Path $ext_dir\blackfire.dll) { Enable-PhpExtension -Extension blackfire -Path $php_dir diff --git a/src/scripts/ext/blackfire.sh b/src/scripts/ext/blackfire.sh index 027e7c5c..5eb28678 100644 --- a/src/scripts/ext/blackfire.sh +++ b/src/scripts/ext/blackfire.sh @@ -8,7 +8,11 @@ add_blackfire() { blackfire_ini_file="${pecl_file:-${ini_file[@]}}" if [ ! -e "${ext_dir:?}/blackfire.so" ]; then if [ "$extension_version" = "blackfire" ]; then - extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3) + if [[ ${version:?} =~ 5.[3-6] ]]; then + extension_version='1.50.0' + else + extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3) + fi fi get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_amd64-php-"$no_dot_version".so >/dev/null 2>&1 fi