Skip to content

Commit

Permalink
update Swoole to make it available for PHP 8.3 (#525)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
deminy authored Feb 3, 2024
1 parent c61bdf4 commit 2f023ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions layers/swoole/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
3 changes: 2 additions & 1 deletion layers/swoole/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"php": [
"80",
"81",
"82"
"82",
"83"
]
}

0 comments on commit 2f023ac

Please sign in to comment.