From 8595a480f4583cd4e4913f9a3843768e2b6020b1 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 13 Dec 2023 20:14:33 +0100 Subject: [PATCH] Fix segmentation fault of swoole on PHP 8.3 (#847) --- install-php-extensions | 14 ++++++++++---- scripts/tests/swoole | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100755 scripts/tests/swoole diff --git a/install-php-extensions b/install-php-extensions index ff61ab4..e0a74de 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -3598,6 +3598,12 @@ installRemoteModule() { fi ;; esac + if test $PHP_MAJMIN_VERSION -eq 803; then + # see https://github.com/swoole/docker-swoole/issues/45 + installRemoteModule_curl=no + else + installRemoteModule_curl=yes + fi if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 5.0.1) -ge 0; then # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets @@ -3606,7 +3612,7 @@ installRemoteModule() { # enable mysqlnd support? addConfigureOption enable-mysqlnd yes # enable curl support? - addConfigureOption enable-swoole-curl yes + addConfigureOption enable-swoole-curl $installRemoteModule_curl # enable cares support? addConfigureOption enable-cares yes # enable brotli support? @@ -3619,7 +3625,7 @@ installRemoteModule() { # enable mysqlnd support? addConfigureOption enable-mysqlnd yes # enable curl support? - addConfigureOption enable-swoole-curl yes + addConfigureOption enable-swoole-curl $installRemoteModule_curl # enable cares support? addConfigureOption enable-cares yes elif test $(compareVersions "$installRemoteModule_version" 4.8.11) -ge 0; then @@ -3634,7 +3640,7 @@ installRemoteModule() { # enable json support? addConfigureOption enable-swoole-json yes # enable curl support? - addConfigureOption enable-swoole-curl yes + addConfigureOption enable-swoole-curl $installRemoteModule_curl # enable cares support? addConfigureOption enable-cares yes elif test $(compareVersions "$installRemoteModule_version" 4.6.1) -ge 0; then @@ -3649,7 +3655,7 @@ installRemoteModule() { # enable json support? addConfigureOption enable-swoole-json yes # enable curl support? - addConfigureOption enable-swoole-curl yes + addConfigureOption enable-swoole-curl $installRemoteModule_curl elif test $(compareVersions "$installRemoteModule_version" 4.4.0) -ge 0; then # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets diff --git a/scripts/tests/swoole b/scripts/tests/swoole new file mode 100755 index 0000000..13d3eea --- /dev/null +++ b/scripts/tests/swoole @@ -0,0 +1,15 @@ +#!/usr/bin/env php +