From 61c2fb58cfa267e8b090da012069faec9824b357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=90=E5=B0=8F=E5=BF=83?= Date: Fri, 4 Nov 2022 22:58:11 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20Swoole=E6=89=A9=E5=B1=95=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=85=B3=E9=97=ADuse=5Fshortname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare.php | 10 +++++----- sapi/swoole.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 sapi/swoole.patch diff --git a/prepare.php b/prepare.php index 3c20ec7084..ebb19f9803 100755 --- a/prepare.php +++ b/prepare.php @@ -481,7 +481,7 @@ function install_curl(Preprocessor $p) 'mongodb' => function ($p) { $p->addExtension((new Extension('mongodb')) ->withOptions('--enable-mongodb --with-mongodb-sasl=no') - ->withPeclVersion('1.14.1')); + ->withPeclVersion('1.14.2')); } ]; @@ -504,12 +504,12 @@ function install_curl(Preprocessor $p) if ($type != "windows"){ $extEnabled[] = "mongodb"; - $endCallback[] = function ($p) { - echo `curl https://raw.githubusercontent.com/mongodb/mongo-c-driver/master/src/libbson/src/bson/bson-cmp.h > ext/mongodb/src/libmongoc/src/libbson/src/bson/bson-cmp.h`; - echo `cat ext/mongodb/src/libmongoc/src/libbson/src/bson/bson-cmp.h`; - }; } +$endCallback[] = function($p) { + // Swoole Patch + echo `patch -p0 < ./sapi/swoole.patch`; +}; for ($i = 1; $i < $argc; $i++) { $op = $argv[$i][0]; diff --git a/sapi/swoole.patch b/sapi/swoole.patch new file mode 100644 index 0000000000..520a40d7a0 --- /dev/null +++ b/sapi/swoole.patch @@ -0,0 +1,11 @@ +--- ext/swoole/ext-src/php_swoole.cc.original 2022-11-04 22:52:10 ++++ ext/swoole/ext-src/php_swoole.cc 2022-11-04 22:52:44 +@@ -302,7 +302,7 @@ + /** + * use short class name + */ +-STD_ZEND_INI_BOOLEAN("swoole.use_shortname", "On", PHP_INI_SYSTEM, OnUpdateBool, use_shortname, zend_swoole_globals, swoole_globals) ++STD_ZEND_INI_BOOLEAN("swoole.use_shortname", "Off", PHP_INI_SYSTEM, OnUpdateBool, use_shortname, zend_swoole_globals, swoole_globals) + /** + * unix socket buffer size + */