mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +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.
|
||||
|
||||
- `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.
|
||||
|
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)) ||
|
||||
(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) {
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user