From 50fce4c74bd6b3535ba8035d09f26cd8a359c61f Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sat, 13 Mar 2021 01:39:22 +0200 Subject: [PATCH] fix(amqp extension): hard-code the version for PHP 8.0 The version could be hard-coded in the Dockerfile due to no ability to build workspace image w/o problems from scratch for different PHP versions. Closes #2871 --- workspace/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 1225fc85..cb6c7024 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -503,8 +503,12 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ARG INSTALL_AMQP=false RUN if [ ${INSTALL_AMQP} = true ]; then \ - apt-get install librabbitmq-dev -y && \ - pecl -q install amqp && \ + apt-get install -yqq librabbitmq-dev && \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \ + printf "\n" | pecl install amqp-1.11.0beta; \ + else \ + printf "\n" | pecl install amqp; \ + fi && \ echo "extension=amqp.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini && \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \ ;fi