From f9edf13d651b8378959393819f5245581a7dc9a4 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 14 Mar 2021 17:50:14 +0200 Subject: [PATCH] feat(swoole extension): change installation to be able to use PHP 8.0 Add support for PHP 8.0 Fix other versions of PHP with correct versions. Closes #2879 --- php-fpm/Dockerfile | 11 +++++++---- workspace/Dockerfile | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 2d8d67e..e3d910f 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -285,16 +285,19 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ ########################################################################### ARG INSTALL_SWOOLE=false - RUN if [ ${INSTALL_SWOOLE} = true ]; then \ # Install Php Swoole Extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install swoole-2.0.10; \ + pecl -q install swoole-2.0.11; \ else \ if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ - pecl install swoole-2.2.0; \ + echo '' | pecl install swoole-4.3.5; \ else \ - pecl install swoole; \ + if [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \ + echo '' | pecl install swoole-4.6.0; \ + else \ + echo '' | pecl install swoole; \ + fi \ fi \ fi && \ docker-php-ext-enable swoole \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 1225fc8..95efc93 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -572,12 +572,16 @@ ARG INSTALL_SWOOLE=false RUN if [ ${INSTALL_SWOOLE} = true ]; then \ # Install Php Swoole Extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl -q install swoole-2.0.10; \ + pecl -q install swoole-2.0.11; \ else \ if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ - pecl install swoole-2.2.0; \ + echo '' | pecl install swoole-4.3.5; \ else \ - pecl install swoole; \ + if [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \ + echo '' | pecl install swoole-4.6.0; \ + else \ + echo '' | pecl install swoole; \ + fi \ fi \ fi && \ echo "extension=swoole.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini && \