From f4d4d731a33a934fd81a9aedc0dfcedc5b5230e8 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 19 Dec 2024 00:11:57 +0800 Subject: [PATCH] default swoole version upgrade to v6.0.0 --- sapi/scripts/generate-artifact-hash.sh | 7 +------ sapi/src/builder/extension/swoole.php | 26 ++++++++++++-------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/sapi/scripts/generate-artifact-hash.sh b/sapi/scripts/generate-artifact-hash.sh index 53d291e5e..fe91d30c8 100644 --- a/sapi/scripts/generate-artifact-hash.sh +++ b/sapi/scripts/generate-artifact-hash.sh @@ -142,7 +142,7 @@ WINDOWS_DOWNLOAD_SWOOLE_CLIE_RUNTIME() { APP_RUNTIME="${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}" test -f ${APP_RUNTIME}.zip || curl -LSo ${APP_RUNTIME}.zip ${APP_DOWNLOAD_URL} - test -f all-deps.zip || curl -LSo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/${X_VERSION}/all-deps.zip + test -f all-deps.zip || curl -LSo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/${VERSION}/all-deps.zip } WINDOWS_DOWNLOAD() { @@ -168,11 +168,6 @@ DOWNLOAD() { } DOWNLOAD -======= -APP_RUNTIME="${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}" -test -f ${APP_RUNTIME}.zip || curl -LSo ${APP_RUNTIME}.zip ${APP_DOWNLOAD_URL} -test -f all-deps.zip || curl -LSo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/${VERSION}/all-deps.zip ->>>>>>> experiment-feature-new ls -p | grep -v '/$' | xargs sha256sum diff --git a/sapi/src/builder/extension/swoole.php b/sapi/src/builder/extension/swoole.php index 865a52cb5..5bf826d90 100644 --- a/sapi/src/builder/extension/swoole.php +++ b/sapi/src/builder/extension/swoole.php @@ -9,20 +9,18 @@ $dependentLibraries = ['curl', 'openssl', 'cares', 'zlib', 'brotli', 'nghttp2', 'sqlite3', 'unix_odbc', 'pgsql']; $dependentExtensions = ['curl', 'openssl', 'sockets', 'mysqlnd', 'pdo']; - $swoole_tag = 'v5.1.6'; - if (BUILD_CUSTOM_PHP_VERSION_ID >= 8040) { - // v5.1.x 不支持 PHP 8.4 - // swoole 支持计划 https://wiki.swoole.com/zh-cn/#/version/supported?id=%e6%94%af%e6%8c%81%e8%ae%a1%e5%88%92 - $swoole_tag = 'master'; - $options[] = '--enable-swoole-thread'; - $options[] = '--enable-zts'; - $options[] = '--disable-opcache-jit'; - $options[] = '--enable-brotli'; - $options[] = '--enable-zstd'; - $dependentLibraries[] = 'libzstd'; - $p->withExportVariable('ZSTD_CFLAGS', '$(pkg-config --cflags --static libzstd)'); - $p->withExportVariable('ZSTD_LIBS', '$(pkg-config --libs --static libzstd)'); - } + // v5.1.x 不支持 PHP 8.4 + // swoole 支持计划 https://wiki.swoole.com/zh-cn/#/version/supported?id=%e6%94%af%e6%8c%81%e8%ae%a1%e5%88%92 + $swoole_tag = 'v6.0.0'; + $options[] = '--enable-swoole-thread'; + $options[] = '--enable-zts'; + $options[] = '--disable-opcache-jit'; + $options[] = '--enable-brotli'; + $options[] = '--enable-zstd'; + $dependentLibraries[] = 'libzstd'; + $p->withExportVariable('ZSTD_CFLAGS', '$(pkg-config --cflags --static libzstd)'); + $p->withExportVariable('ZSTD_LIBS', '$(pkg-config --libs --static libzstd)'); + $file = "swoole-{$swoole_tag}.tar.gz"; $url = "https://github.com/swoole/swoole-src/archive/refs/tags/{$swoole_tag}.tar.gz";