From 2f023ac544772cc0730e3fec97738835e266973d Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Fri, 2 Feb 2024 22:06:14 -0800 Subject: [PATCH] update Swoole to make it available for PHP 8.3 (#525) * update Swoole to v5.1.2 and to support PHP 8.3 * make mysqlnd and PostgreSQL operations in PHP coroutine-friendly * remove deprecated configuration option --enable-mysqlnd --- layers/swoole/Dockerfile | 6 +++--- layers/swoole/config.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/layers/swoole/Dockerfile b/layers/swoole/Dockerfile index 335b6628..226c35cf 100644 --- a/layers/swoole/Dockerfile +++ b/layers/swoole/Dockerfile @@ -3,13 +3,13 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext RUN set -ex && \ - LD_LIBRARY_PATH=/lib64:/lib yum install -y libcurl-devel openssl-devel && \ + LD_LIBRARY_PATH=/lib64:/lib yum install -y libcurl-devel postgresql-devel openssl-devel && \ mkdir ${PHP_BUILD_DIR}/ext/swoole && \ - curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.2.tar.gz -o swoole.tar.gz && \ + curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.2.tar.gz -o swoole.tar.gz && \ tar xfz swoole.tar.gz --strip-components=1 -C ${PHP_BUILD_DIR}/ext/swoole && \ cd ${PHP_BUILD_DIR}/ext/swoole && \ phpize && \ - ./configure --enable-openssl --enable-sockets --enable-swoole-curl && \ + ./configure --enable-swoole-pgsql --enable-openssl --enable-sockets --enable-swoole-curl && \ make -j $(nproc) && \ make install && \ cp "$(php-config --extension-dir)/swoole.so" /tmp/swoole.so && \ diff --git a/layers/swoole/config.json b/layers/swoole/config.json index a5a35316..eea4b0f4 100644 --- a/layers/swoole/config.json +++ b/layers/swoole/config.json @@ -2,6 +2,7 @@ "php": [ "80", "81", - "82" + "82", + "83" ] }