From 548fc6a9179d0b9fbbfe185dd478c7dc241cb529 Mon Sep 17 00:00:00 2001 From: le0m Date: Wed, 27 Nov 2024 12:20:56 +0100 Subject: [PATCH 1/4] feat: php 8.4 --- .github/workflows/main.yml | 4 ++-- Makefile | 4 ++-- README.md | 3 +++ dev/Makefile | 4 ++-- dev/README.md | 3 +++ pcov/Makefile | 2 +- pcov/README.md | 3 +++ xhprof/Makefile | 4 ++-- xhprof/README.md | 3 +++ 9 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b87471c..69d6d8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }} strategy: matrix: - version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ] include: - version: 'latest' @@ -117,7 +117,7 @@ jobs: if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }} strategy: matrix: - version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ] include: - version: 'latest' diff --git a/Makefile b/Makefile index dd36fde..b350bc9 100644 --- a/Makefile +++ b/Makefile @@ -33,11 +33,11 @@ EXTENSIONS := \ xsl \ zip \ sockets -ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt endif -ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to 5.x series images. EXTENSIONS += mysql endif diff --git a/README.md b/README.md index 376497e..8a9f8c4 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,9 @@ For development environments, you might want to choose an [image with XDebug ins - `8.3` - `8.3-apache` - `8.3-fpm` +- `8.4` +- `8.4-apache` +- `8.4-fpm` As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance. diff --git a/dev/Makefile b/dev/Makefile index 5067a05..d9b1b6a 100644 --- a/dev/Makefile +++ b/dev/Makefile @@ -34,11 +34,11 @@ EXTENSIONS := \ xsl \ zip \ sockets -ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt endif -ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to 5.x series images. EXTENSIONS += mysql endif diff --git a/dev/README.md b/dev/README.md index d5d2703..66fc1c1 100644 --- a/dev/README.md +++ b/dev/README.md @@ -56,6 +56,9 @@ For more production-like environments, you might want to choose an [image *witho - `8.3` - `8.3-apache` - `8.3-fpm` +- `8.4` +- `8.4-apache` +- `8.4-fpm` As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance. diff --git a/pcov/Makefile b/pcov/Makefile index d15e3f4..235212f 100644 --- a/pcov/Makefile +++ b/pcov/Makefile @@ -34,7 +34,7 @@ EXTENSIONS := \ xsl \ zip \ sockets -ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt endif diff --git a/pcov/README.md b/pcov/README.md index e7a49c8..d8de3a2 100644 --- a/pcov/README.md +++ b/pcov/README.md @@ -50,6 +50,9 @@ For more production-like environments, you might want to choose an [image *witho - `8.3` - `8.3-apache` - `8.3-fpm` +- `8.4` +- `8.4-apache` +- `8.4-fpm` As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance. diff --git a/xhprof/Makefile b/xhprof/Makefile index e4a0934..d62f300 100644 --- a/xhprof/Makefile +++ b/xhprof/Makefile @@ -34,11 +34,11 @@ EXTENSIONS := \ xhprof \ xsl \ zip -ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt endif -ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine)) +ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine)) # Add more extensions to 5.x series images. EXTENSIONS += mysql endif diff --git a/xhprof/README.md b/xhprof/README.md index b9fa9cc..2983023 100644 --- a/xhprof/README.md +++ b/xhprof/README.md @@ -56,6 +56,9 @@ For more production-like environments, you might want to choose an [image *witho - `8.3` - `8.3-apache` - `8.3-fpm` +- `8.4` +- `8.4-apache` +- `8.4-fpm` As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance. From 456aae4b12a807dd89dfde3659f612f305bd8aa4 Mon Sep 17 00:00:00 2001 From: le0m Date: Wed, 27 Nov 2024 14:07:07 +0100 Subject: [PATCH 2/4] fix: let mlocati/docker-php-extension-installer handle imagick installation for php 8.3 and 8.4 --- Dockerfile | 6 +----- Dockerfile.alpine | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 440425c..cae8d9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \ exif \ gd \ gettext \ + imagick \ intl \ ldap \ memcached \ @@ -47,11 +48,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \ 5.6.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt mysql";; \ 7.0.*|7.1.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt";; \ esac \ - # Install Imagick from master on PHP >= 8.3, because imagick 3.7.0 broke on latest PHP releases and Imagick maintainers don't care to tag a newer release - && if [ $(php -r 'echo PHP_VERSION_ID;') -lt 80300 ]; then \ - PHP_EXTENSIONS="$PHP_EXTENSIONS imagick"; \ - else PHP_EXTENSIONS="$PHP_EXTENSIONS https://api.github.com/repos/Imagick/imagick/tarball/28f27044e435a2b203e32675e942eb8de620ee58"; \ - fi \ && install-php-extensions $PHP_EXTENSIONS \ && if command -v a2enmod; then a2enmod rewrite; fi diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 804a911..9fddb5c 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -21,6 +21,7 @@ RUN apk add --no-cache \ exif \ gd \ gettext \ + imagick \ intl \ ldap \ memcached \ @@ -39,11 +40,6 @@ RUN apk add --no-cache \ 5.6.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt mysql";; \ 7.0.*|7.1.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt";; \ esac \ - # Install Imagick from master on PHP >= 8.3, because imagick 3.7.0 broke on latest PHP releases and Imagick maintainers don't care to tag a newer release - && if [ $(php -r 'echo PHP_VERSION_ID;') -lt 80300 ]; then \ - PHP_EXTENSIONS="$PHP_EXTENSIONS imagick"; \ - else PHP_EXTENSIONS="$PHP_EXTENSIONS https://api.github.com/repos/Imagick/imagick/tarball/28f27044e435a2b203e32675e942eb8de620ee58"; \ - fi \ && install-php-extensions $PHP_EXTENSIONS \ && if command -v a2enmod; then a2enmod rewrite; fi From 68058d8dc82fec5c7443c80cc6693ead3ce12261 Mon Sep 17 00:00:00 2001 From: le0m Date: Wed, 27 Nov 2024 14:42:26 +0100 Subject: [PATCH 3/4] fix: use beta version of xdebug for PHP 8.4 --- dev/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev/Dockerfile b/dev/Dockerfile index 9e7190e..a632f62 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -2,5 +2,9 @@ ARG BASE_IMAGE=chialab/php:latest FROM ${BASE_IMAGE} LABEL maintainer="dev@chialab.io" -# Install XDebug. -RUN install-php-extensions xdebug +# Install XDebug. Use beta version for PHP 8.4 +RUN if [ $(php-config --vernum) -lt 80400 ]; then \ + install-php-extensions xdebug; \ + else \ + install-php-extensions xdebug-beta; \ + fi From fe1dea085a336bca4ce242a299d7fc8fcff6198e Mon Sep 17 00:00:00 2001 From: le0m Date: Wed, 27 Nov 2024 15:42:10 +0100 Subject: [PATCH 4/4] fix: skip pcov image for PHP 8.4 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69d6d8e..09c01d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,7 @@ jobs: run: 'docker pull localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }} && make -C dev test' - name: Build PCOV image for testing - if: ${{ matrix.version >= 7.1 }} + if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }} uses: docker/build-push-action@v5 with: cache-to: type=inline @@ -88,7 +88,7 @@ jobs: push: true - name: Test PCOV image - if: ${{ matrix.version >= 7.1 }} + if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }} env: REGISTRY: localhost:5000/ VERSION: ${{ matrix.version }}${{ matrix.flavor }} @@ -188,7 +188,7 @@ jobs: push: true - name: Build PCOV image and push to registry - if: ${{ matrix.version >= 7.1 }} + if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }} uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64