diff --git a/README.md b/README.md index 89da2432..e6274b69 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,6 @@ jobs: > Setup a nightly build of `PHP 8.0.0-dev` from the [master branch](https://github.com/php/php-src/tree/master "Master branch on PHP source repository") of PHP. -- `PECL` is installed by default with this version on `Ubuntu` and `macOS`. - Some extensions might not support this version currently. - Refer to this [RFC](https://wiki.php.net/rfc/jit "PHP JIT RFC configuration") for configuring `PHP JIT` on this version. - Refer to this [list of RFCs](https://wiki.php.net/rfc#php_80 "List of RFCs implemented in PHP8") implemented in this version. diff --git a/dist/index.js b/dist/index.js index 38da1653..0f3e1c6e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2393,12 +2393,7 @@ async function build(filename, version, os_version) { const ini_values_csv = (await utils.getInput('ini-values', false)) || (await utils.getInput('ini-values-csv', false)); const coverage_driver = await utils.getInput('coverage', false); - const pecl = await utils.getInput('pecl', false); - let tools_csv = await utils.getInput('tools', false); - if (pecl == 'true' || - /.*-(beta|alpha|devel|snapshot).*/.test(extension_csv)) { - tools_csv = 'pecl, ' + tools_csv; - } + const tools_csv = await utils.getInput('tools', false); let script = await utils.readScript(filename); script += await tools.addTools(tools_csv, version, os_version); if (extension_csv) { diff --git a/src/install.ts b/src/install.ts index ee0bc9f3..bf1185b1 100644 --- a/src/install.ts +++ b/src/install.ts @@ -29,14 +29,7 @@ export async function build( (await utils.getInput('ini-values', false)) || (await utils.getInput('ini-values-csv', false)); const coverage_driver: string = await utils.getInput('coverage', false); - const pecl: string = await utils.getInput('pecl', false); - let tools_csv: string = await utils.getInput('tools', false); - if ( - pecl == 'true' || - /.*-(beta|alpha|devel|snapshot).*/.test(extension_csv) - ) { - tools_csv = 'pecl, ' + tools_csv; - } + const tools_csv: string = await utils.getInput('tools', false); let script: string = await utils.readScript(filename); script += await tools.addTools(tools_csv, version, os_version); diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 2f9fff35..0a1d7ff9 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -36,13 +36,15 @@ update_lists() { # Function to configure PECL configure_pecl() { - if [ "$pecl_config" = "false" ] && [ -e /usr/bin/pecl ]; then - for tool in pear pecl; do - sudo "$tool" config-set php_ini "$pecl_file" >/dev/null 2>&1 - sudo "$tool" config-set auto_discover 1 >/dev/null 2>&1 - sudo "$tool" channel-update "$tool".php.net >/dev/null 2>&1 + if ! [ -e /tmp/pecl_config ]; then + if ! command -v pecl >/dev/null || ! command -v pear >/dev/null; then + add_pecl >/dev/null 2>&1 + fi + for script in pear pecl; do + sudo "$script" config-set php_ini "${pecl_file:-${ini_file[@]}}" + sudo "$script" channel-update "$script".php.net done - pecl_config="true" + echo '' | sudo tee /tmp/pecl_config >/dev/null 2>&1 fi } @@ -267,7 +269,6 @@ configure_php() { tick="✓" cross="✗" lists_updated="false" -pecl_config="false" version=$1 dist=$2 debconf_fix="DEBIAN_FRONTEND=noninteractive"