From 35a7fc204c92f11a4f0d59464bd689b0b0fa761a Mon Sep 17 00:00:00 2001 From: kideny Date: Fri, 1 May 2020 00:57:27 +0800 Subject: [PATCH 1/2] update support phalcon4.X version --- env-example | 2 +- php-fpm/Dockerfile | 9 ++++++++- php-fpm/phalcon.ini | 1 + php-worker/Dockerfile | 7 +++++++ workspace/Dockerfile | 9 ++++++++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/env-example b/env-example index ee6eee4b..6356aa41 100644 --- a/env-example +++ b/env-example @@ -44,7 +44,7 @@ PHP_VERSION=7.3 ### Phalcon Version ########################################### # Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+ -PHALCON_VERSION=3.4.5 +PHALCON_VERSION=4.0.5 ### PHP Interpreter ####################################### diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 9d5f895d..b7cd3208 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -721,7 +721,14 @@ ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION} COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable RUN if [ $INSTALL_PHALCON = true ]; then \ - apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \ + apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c git automake autoconf\ + && git clone https://github.com/jbboehr/php-psr.git \ + && cd php-psr \ + && phpize \ + && ./configure \ + && make \ + && make test \ + && make install \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \ && cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \ diff --git a/php-fpm/phalcon.ini b/php-fpm/phalcon.ini index 24b58bad..a5013838 100644 --- a/php-fpm/phalcon.ini +++ b/php-fpm/phalcon.ini @@ -1 +1,2 @@ +extension=psr.so extension=phalcon.so \ No newline at end of file diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 2524dea1..ed3331ed 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -160,6 +160,13 @@ ENV PHALCON_VERSION ${PHALCON_VERSION} RUN if [ $INSTALL_PHALCON = true ]; then \ apk --update add unzip gcc make re2c bash\ + && git clone https://github.com/jbboehr/php-psr.git \ + && cd php-psr \ + && phpize \ + && ./configure \ + && make \ + && make test \ + && make install \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \ && cd /tmp/cphalcon-${PHALCON_VERSION}/build \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4a105bb4..c6724abf 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1164,7 +1164,14 @@ ARG LARADOCK_PHALCON_VERSION ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION} RUN if [ $INSTALL_PHALCON = true ]; then \ - apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \ + apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c git automake autoconf\ + && git clone https://github.com/jbboehr/php-psr.git \ + && cd php-psr \ + && phpize \ + && ./configure \ + && make \ + && make test \ + && make install \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \ && cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \ From 24c02ec1cf5dd7c7f3f8f0737dee1a523809ac46 Mon Sep 17 00:00:00 2001 From: kideny Date: Sat, 2 May 2020 03:07:29 +0800 Subject: [PATCH 2/2] fixed --- workspace/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index c6724abf..ce2805e3 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1176,6 +1176,7 @@ RUN if [ $INSTALL_PHALCON = true ]; then \ && unzip -d /tmp/ /tmp/cphalcon.zip \ && cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \ && ./install \ + && echo "extension=psr.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \ && echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \ && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \ && rm -rf /tmp/cphalcon* \