From ff5499165aa6742228099e0feb0b3e2cfc1b299a Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 17 Dec 2020 13:59:27 +0530 Subject: [PATCH] Set JIT related ini values on PHP 8 --- src/scripts/common.sh | 1 + src/scripts/darwin.sh | 1 - src/scripts/linux.sh | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 1d8702c0..a866c874 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -3,6 +3,7 @@ export tick="✓" export cross="✗" export curl_opts=(-sL) export old_versions="5.[3-5]" +export jit_versions="8.[0-1]" export tool_path_dir="/usr/local/bin" export composer_bin="$HOME/.composer/vendor/bin" export composer_json="$HOME/.composer/composer.json" diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 98aaf150..09f119b0 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -157,7 +157,6 @@ setup_php() { version=$1 dist=$2 nightly_versions="8.1" -jit_versions="8.[0-1]" brew_prefix="$(brew --prefix)" tap_dir="$brew_prefix"/Homebrew/Library/Taps export HOMEBREW_NO_INSTALL_CLEANUP=1 diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index ebb621ff..8cf4f5a5 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -281,6 +281,7 @@ setup_php() { sudo rm -rf /usr/local/bin/phpunit >/dev/null 2>&1 sudo chmod 777 "${ini_file[@]}" "$pecl_file" "${tool_path_dir:?}" sudo cp "$dist"/../src/configs/*.json "$RUNNER_TOOL_CACHE/" + [[ "$version" =~ ${jit_versions:?} ]] && echo -e "opcache.enable=1\nopcache.jit_buffer_size=256M\nopcache.jit=1235" | sudo tee -a "${ini_file[@]}" >/dev/null 2>&1 add_log "${tick:?}" "PHP" "$status PHP $semver" }