mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-25 05:01:07 +07:00
Add known non-default extension priorities in a config
This commit is contained in:
parent
3d794ddd93
commit
36e33e130a
27
src/configs/mod_priority
Normal file
27
src/configs/mod_priority
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apc=25
|
||||||
|
apcu_bc=25
|
||||||
|
apcu-bc=25
|
||||||
|
blackfire=30
|
||||||
|
decimal=30
|
||||||
|
ds=30
|
||||||
|
grpc=30
|
||||||
|
http=25
|
||||||
|
pecl_http=25
|
||||||
|
pecl-http=25
|
||||||
|
inotify=30
|
||||||
|
libvirt-php=40
|
||||||
|
mailparse=25
|
||||||
|
maxminddb=30
|
||||||
|
memcached=25
|
||||||
|
mysqlnd=10
|
||||||
|
mysqlnd_ms=30
|
||||||
|
opcache=10
|
||||||
|
pdo=10
|
||||||
|
phalcon=35
|
||||||
|
protobuf=30
|
||||||
|
psr=15
|
||||||
|
rdkafka=30
|
||||||
|
swoole=25
|
||||||
|
vips=30
|
||||||
|
xml=15
|
||||||
|
zstd=30
|
@ -50,7 +50,12 @@ enable_extension() {
|
|||||||
enable_cache_extension_dependencies "$1" "$2"
|
enable_cache_extension_dependencies "$1" "$2"
|
||||||
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then
|
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then
|
||||||
mod="${ini_dir:?}"/../mods-available/"$1".ini
|
mod="${ini_dir:?}"/../mods-available/"$1".ini
|
||||||
[ -e "$mod" ] || (echo "; priority=${3:'20'}"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
|
if ! [ -e "$mod" ]; then
|
||||||
|
priority="${3:-20}";
|
||||||
|
mod_priority_line="$(grep -E "^$1=" "${src:?}/configs/mod_priority")";
|
||||||
|
[ -n "$mod_priority_line" ] && priority=$(echo "$mod_priority_line" | cut -d'=' -f 2)
|
||||||
|
(echo "; priority=$priority"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
|
||||||
|
fi
|
||||||
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
|
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
|
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user