mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Improve pecl support
This commit is contained in:
parent
678ad243bf
commit
1bb08cc017
@ -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.
|
> 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.
|
- 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 [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.
|
- Refer to this [list of RFCs](https://wiki.php.net/rfc#php_80 "List of RFCs implemented in PHP8") implemented in this version.
|
||||||
|
7
dist/index.js
vendored
7
dist/index.js
vendored
@ -2393,12 +2393,7 @@ async function build(filename, version, os_version) {
|
|||||||
const ini_values_csv = (await utils.getInput('ini-values', false)) ||
|
const ini_values_csv = (await utils.getInput('ini-values', false)) ||
|
||||||
(await utils.getInput('ini-values-csv', false));
|
(await utils.getInput('ini-values-csv', false));
|
||||||
const coverage_driver = await utils.getInput('coverage', false);
|
const coverage_driver = await utils.getInput('coverage', false);
|
||||||
const pecl = await utils.getInput('pecl', false);
|
const tools_csv = await utils.getInput('tools', false);
|
||||||
let tools_csv = await utils.getInput('tools', false);
|
|
||||||
if (pecl == 'true' ||
|
|
||||||
/.*-(beta|alpha|devel|snapshot).*/.test(extension_csv)) {
|
|
||||||
tools_csv = 'pecl, ' + tools_csv;
|
|
||||||
}
|
|
||||||
let script = await utils.readScript(filename);
|
let script = await utils.readScript(filename);
|
||||||
script += await tools.addTools(tools_csv, version, os_version);
|
script += await tools.addTools(tools_csv, version, os_version);
|
||||||
if (extension_csv) {
|
if (extension_csv) {
|
||||||
|
@ -29,14 +29,7 @@ export async function build(
|
|||||||
(await utils.getInput('ini-values', false)) ||
|
(await utils.getInput('ini-values', false)) ||
|
||||||
(await utils.getInput('ini-values-csv', false));
|
(await utils.getInput('ini-values-csv', false));
|
||||||
const coverage_driver: string = await utils.getInput('coverage', false);
|
const coverage_driver: string = await utils.getInput('coverage', false);
|
||||||
const pecl: string = await utils.getInput('pecl', false);
|
const tools_csv: string = await utils.getInput('tools', 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
let script: string = await utils.readScript(filename);
|
let script: string = await utils.readScript(filename);
|
||||||
script += await tools.addTools(tools_csv, version, os_version);
|
script += await tools.addTools(tools_csv, version, os_version);
|
||||||
|
@ -36,13 +36,15 @@ update_lists() {
|
|||||||
|
|
||||||
# Function to configure PECL
|
# Function to configure PECL
|
||||||
configure_pecl() {
|
configure_pecl() {
|
||||||
if [ "$pecl_config" = "false" ] && [ -e /usr/bin/pecl ]; then
|
if ! [ -e /tmp/pecl_config ]; then
|
||||||
for tool in pear pecl; do
|
if ! command -v pecl >/dev/null || ! command -v pear >/dev/null; then
|
||||||
sudo "$tool" config-set php_ini "$pecl_file" >/dev/null 2>&1
|
add_pecl >/dev/null 2>&1
|
||||||
sudo "$tool" config-set auto_discover 1 >/dev/null 2>&1
|
fi
|
||||||
sudo "$tool" channel-update "$tool".php.net >/dev/null 2>&1
|
for script in pear pecl; do
|
||||||
|
sudo "$script" config-set php_ini "${pecl_file:-${ini_file[@]}}"
|
||||||
|
sudo "$script" channel-update "$script".php.net
|
||||||
done
|
done
|
||||||
pecl_config="true"
|
echo '' | sudo tee /tmp/pecl_config >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +269,6 @@ configure_php() {
|
|||||||
tick="✓"
|
tick="✓"
|
||||||
cross="✗"
|
cross="✗"
|
||||||
lists_updated="false"
|
lists_updated="false"
|
||||||
pecl_config="false"
|
|
||||||
version=$1
|
version=$1
|
||||||
dist=$2
|
dist=$2
|
||||||
debconf_fix="DEBIAN_FRONTEND=noninteractive"
|
debconf_fix="DEBIAN_FRONTEND=noninteractive"
|
||||||
|
Loading…
Reference in New Issue
Block a user