diff --git a/.github/workflows/php-nightly.yml b/.github/workflows/php-nightly.yml index b48cabb..3e8f8f9 100644 --- a/.github/workflows/php-nightly.yml +++ b/.github/workflows/php-nightly.yml @@ -82,7 +82,7 @@ jobs: - '8.1' refs: - 'master' - - '0.118' + - '0.121' steps: # ------------------------------------------------------------ diff --git a/CHANGELOG.md b/CHANGELOG.md index a1adfad..6b9d490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ ## Unreleased +## Release 0.121 + +#### Fixed +- Fixed `msgpack` install for PHP 7.0 - 7.4 + +#### Changed +- Compile `redis` extension with `msgpack` and `igbinary` + + ## Release 0.120 #### Fixed diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 5b4743f..6ed860a 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -314,10 +314,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: memcache -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: PECL extension # Default: Pecl command - && pecl install memcache \ + && pecl install memcache-4.0.5.2 \ # Enabling && docker-php-ext-enable memcache \ && true @@ -537,9 +537,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ # Installation: Generic - # Type: PECL extension - # Default: Pecl command - && pecl install redis \ + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ + # Custom: Install command + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ + \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 6176dde..cc8889a 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -314,10 +314,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: memcache -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: PECL extension # Default: Pecl command - && pecl install memcache \ + && pecl install memcache-4.0.5.2 \ # Enabling && docker-php-ext-enable memcache \ && true @@ -537,9 +537,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ # Installation: Generic - # Type: PECL extension - # Default: Pecl command - && pecl install redis \ + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ + # Custom: Install command + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ + \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 83b64bc..0bc9894 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -317,10 +317,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: memcache -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: PECL extension # Default: Pecl command - && pecl install memcache \ + && pecl install memcache-4.0.5.2 \ # Enabling && docker-php-ext-enable memcache \ && true @@ -541,9 +541,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ # Installation: Generic - # Type: PECL extension - # Default: Pecl command - && pecl install redis \ + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ + # Custom: Install command + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ + \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 8901622..3005ba7 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -317,10 +317,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: memcache -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: PECL extension # Default: Pecl command - && pecl install memcache \ + && pecl install memcache-4.0.5.2 \ # Enabling && docker-php-ext-enable memcache \ && true @@ -541,9 +541,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ # Installation: Generic - # Type: PECL extension - # Default: Pecl command - && pecl install redis \ + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ + # Custom: Install command + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ + \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index c5d9990..f08bfb0 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -326,10 +326,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: memcache -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: PECL extension # Default: Pecl command - && pecl install memcache \ + && pecl install memcache-4.0.5.2 \ # Enabling && docker-php-ext-enable memcache \ && true @@ -535,9 +535,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ # Installation: Generic - # Type: PECL extension - # Default: Pecl command - && pecl install redis \ + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ + # Custom: Install command + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ + \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index 401edec..2fe4421 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -333,22 +333,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: GIT extension && git clone https://github.com/phpredis/phpredis /tmp/redis \ && cd /tmp/redis \ # Custom: Branch && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ # Custom: Install command - && sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ -&& sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ -&& phpize \ -&& ./configure --enable-redis \ + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-8.1 b/Dockerfiles/mods/Dockerfile-8.1 index 6b84e71..80283b0 100644 --- a/Dockerfiles/mods/Dockerfile-8.1 +++ b/Dockerfiles/mods/Dockerfile-8.1 @@ -333,22 +333,26 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: GIT extension && git clone https://github.com/phpredis/phpredis /tmp/redis \ && cd /tmp/redis \ # Custom: Branch && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ # Custom: Install command - && sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ -&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ -&& sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ -&& phpize \ -&& ./configure --enable-redis \ + && REDIS_ARGS=""; \ +if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ +fi; \ +if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ +fi; \ +phpize \ +&& ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ +&& rm -rf /usr/local/include/php/ext/igbinary \ +&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index c4da2e2..b061519 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -471,6 +471,21 @@ extensions_available: 5.6: type: pecl version: 2.2.7 + 7.0: + type: pecl + version: 4.0.5.2 + 7.1: + type: pecl + version: 4.0.5.2 + 7.2: + type: pecl + version: 4.0.5.2 + 7.3: + type: pecl + version: 4.0.5.2 + 7.4: + type: pecl + version: 4.0.5.2 all: type: pecl build_dep: [zlib1g-dev] @@ -841,38 +856,24 @@ extensions_available: 5.6: type: pecl version: 4.3.0 - 8.0: - type: git - git_url: https://github.com/phpredis/phpredis - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) - # TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.0 - command: | - sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ - && sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ - && phpize \ - && ./configure --enable-redis \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ - 8.1: - type: git - git_url: https://github.com/phpredis/phpredis - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) - # TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.1 - command: | - sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ - && sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ - && sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ - && phpize \ - && ./configure --enable-redis \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ all: - type: pecl + type: git + git_url: https://github.com/phpredis/phpredis + git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) + command: | + REDIS_ARGS=""; \ + if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ + fi; \ + if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ + fi; \ + phpize \ + && ./configure --enable-redis ${REDIS_ARGS} \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + && rm -rf /usr/local/include/php/ext/igbinary \ + && rm -rf /usr/local/include/php/ext/msgpack \ reflection: already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] rdkafka: