From f9b4a73f7b1b94ad7232a7cd629b5d0b328fcbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 21 Nov 2024 14:23:10 +0100 Subject: [PATCH 1/3] ci: add PHP 8.4 to the CD pipeline --- .github/workflows/docker.yaml | 7 +++++-- .github/workflows/sanitizers.yaml | 2 +- .github/workflows/tests.yaml | 2 +- README.md | 2 +- build-static.sh | 2 +- dev-alpine.Dockerfile | 2 +- dev.Dockerfile | 2 +- docker-bake.hcl | 4 ++-- docs/cn/README.md | 2 +- docs/cn/docker.md | 2 +- docs/docker.md | 4 ++-- docs/fr/README.md | 2 +- docs/fr/docker.md | 2 +- docs/tr/README.md | 2 +- docs/tr/docker.md | 2 +- 15 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index f16353691..62ab22f76 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -50,10 +50,12 @@ jobs: run: | PHP_82_LATEST=$(skopeo inspect docker://docker.io/library/php:8.2 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') PHP_83_LATEST=$(skopeo inspect docker://docker.io/library/php:8.3 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') + PHP_84_LATEST=$(skopeo inspect docker://docker.io/library/php:8.4 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') { - echo php_version="${PHP_83_LATEST},${PHP_82_LATEST}" + echo php_version="${PHP_84_LATEST},${PHP_84_LATEST}" echo php82_version="${PHP_82_LATEST//./-}" echo php83_version="${PHP_83_LATEST//./-}" + echo php84_version="${PHP_84_LATEST//./-}" } >> "${GITHUB_OUTPUT}" # Check if the Docker images must be rebuilt @@ -64,8 +66,9 @@ jobs: FRANKENPHP_82_LATEST=$(skopeo inspect docker://docker.io/dunglas/frankenphp:php8.2 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') FRANKENPHP_83_LATEST=$(skopeo inspect docker://docker.io/dunglas/frankenphp:php8.3 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') + FRANKENPHP_84_LATEST=$(skopeo inspect docker://docker.io/dunglas/frankenphp:php8.4 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') - if [[ "${FRANKENPHP_82_LATEST}" == "${PHP_82_LATEST}" ]] && [[ "${FRANKENPHP_83_LATEST}" == "${PHP_83_LATEST}" ]]; then + if [[ "${FRANKENPHP_82_LATEST}" == "${PHP_82_LATEST}" ]] && [[ "${FRANKENPHP_83_LATEST}" == "${PHP_83_LATEST}" ]] && [[ "${FRANKENPHP_84_LATEST}" == "${PHP_84_LATEST}" ]]; then echo skip=true >> "${GITHUB_OUTPUT}" exit 0 fi diff --git a/.github/workflows/sanitizers.yaml b/.github/workflows/sanitizers.yaml index 8be1726e6..4d932d8b2 100644 --- a/.github/workflows/sanitizers.yaml +++ b/.github/workflows/sanitizers.yaml @@ -47,7 +47,7 @@ jobs: name: Determine PHP version id: determine-php-version run: | - curl -fsSL 'https://www.php.net/releases/index.php?json&max=1&version=8.3' -o version.json + curl -fsSL 'https://www.php.net/releases/index.php?json&max=1&version=8.4' -o version.json echo version="$(jq -r 'keys[0]' version.json)" >> "$GITHUB_OUTPUT" echo archive="$(jq -r '.[] .source[] | select(.filename |endswith(".xz")) | "https://www.php.net/distributions/" + .filename' version.json)" >> "$GITHUB_OUTPUT" - diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 319a9391a..23da0a9ee 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -82,6 +82,6 @@ jobs: - name: Lint Go code uses: golangci/golangci-lint-action@v6 - if: matrix.php-versions == '8.3' + if: matrix.php-versions == '8.4' with: version: latest diff --git a/README.md b/README.md index a45f922c6..bb8b18d6b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Go to `https://localhost`, and enjoy! ### Standalone Binary If you prefer not to use Docker, we provide standalone FrankenPHP binaries for Linux and macOS -containing [PHP 8.3](https://www.php.net/releases/8.3/en.php) and most popular PHP extensions. +containing [PHP 8.4](https://www.php.net/releases/8.4/en.php) and most popular PHP extensions. On Windows, use [WSL](https://learn.microsoft.com/windows/wsl/) to run FrankenPHP. diff --git a/build-static.sh b/build-static.sh index 3c342cb63..0d00d1c32 100755 --- a/build-static.sh +++ b/build-static.sh @@ -42,7 +42,7 @@ if ! echo "${PHP_EXTENSION_LIBS}" | grep -q "\bbrotli\b"; then fi if [ -z "${PHP_VERSION}" ]; then - export PHP_VERSION="8.3" + export PHP_VERSION="8.4" fi if [ -z "${FRANKENPHP_VERSION}" ]; then diff --git a/dev-alpine.Dockerfile b/dev-alpine.Dockerfile index b731d976a..30de3dac4 100644 --- a/dev-alpine.Dockerfile +++ b/dev-alpine.Dockerfile @@ -47,7 +47,7 @@ RUN apk add --no-cache \ echo 'set auto-load safe-path /' > /root/.gdbinit WORKDIR /usr/local/src/php -RUN git clone --branch=PHP-8.3 https://github.com/php/php-src.git . && \ +RUN git clone --branch=PHP-8.4 https://github.com/php/php-src.git . && \ # --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly ./buildconf --force && \ ./configure \ diff --git a/dev.Dockerfile b/dev.Dockerfile index fc7ca0336..6d31e9f01 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -49,7 +49,7 @@ RUN apt-get update && \ apt-get clean WORKDIR /usr/local/src/php -RUN git clone --branch=PHP-8.3 https://github.com/php/php-src.git . && \ +RUN git clone --branch=PHP-8.4 https://github.com/php/php-src.git . && \ # --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly ./buildconf --force && \ ./configure \ diff --git a/docker-bake.hcl b/docker-bake.hcl index 9dcd70e7f..b4577d89b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -7,7 +7,7 @@ variable "VERSION" { } variable "PHP_VERSION" { - default = "8.2,8.3" + default = "8.2,8.3,8.4" } variable "GO_VERSION" { @@ -29,7 +29,7 @@ variable "CACHE" { } variable DEFAULT_PHP_VERSION { - default = "8.3" + default = "8.4" } function "tag" { diff --git a/docs/cn/README.md b/docs/cn/README.md index 3228eaf7c..59ef44a48 100644 --- a/docs/cn/README.md +++ b/docs/cn/README.md @@ -34,7 +34,7 @@ docker run -v $PWD:/app/public \ ### 独立二进制 如果您不想使用 Docker,我们为 Linux 和 macOS 提供独立的 FrankenPHP 二进制文件 -,其中包含 [PHP 8.3](https://www.php.net/releases/8.3/en.php) 和最流行的 PHP 扩展:[下载 FrankenPHP](https://github.com/dunglas/frankenphp/releases)。 +,其中包含 [PHP 8.4](https://www.php.net/releases/8.4/en.php) 和最流行的 PHP 扩展:[下载 FrankenPHP](https://github.com/dunglas/frankenphp/releases)。 若要启动当前目录的内容,请运行: diff --git a/docs/cn/docker.md b/docs/cn/docker.md index 59e6933d5..335733798 100644 --- a/docs/cn/docker.md +++ b/docs/cn/docker.md @@ -1,7 +1,7 @@ # 构建自定义 Docker 镜像 [FrankenPHP Docker 镜像](https://hub.docker.com/r/dunglas/frankenphp) 基于 [官方 PHP 镜像](https://hub.docker.com/_/php/)。 -Alpine Linux 和 Debian 衍生版适用于常见的处理器架构,且支持 PHP 8.2 和 PHP 8.3。[查看 Tags](https://hub.docker.com/r/dunglas/frankenphp/tags)。 +Alpine Linux 和 Debian 衍生版适用于常见的处理器架构,支持 PHP 8.2、8.3 和 8.4。。[查看 Tags](https://hub.docker.com/r/dunglas/frankenphp/tags)。 ## 如何使用镜像 diff --git a/docs/docker.md b/docs/docker.md index 466a5cbf6..9e3c43f87 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -2,11 +2,11 @@ [FrankenPHP Docker images](https://hub.docker.com/r/dunglas/frankenphp) are based on [official PHP images](https://hub.docker.com/_/php/). Debian and Alpine Linux variants are provided for popular architectures. Debian variants are recommended. -Variants for PHP 8.2 and PHP 8.3 are provided. +Variants for PHP 8.2, 8.3 and 8.4 are provided. The tags follow this pattern: `dunglas/frankenphp:-php-` -* `` and `` are version numbers of FrankenPHP and PHP respectively, with specifities ranging from major (e.g. `1`), minor (e.g. `1.2`) to patch versions (e.g. `1.2.3`). +* `` and `` are version numbers of FrankenPHP and PHP respectively, ranging from major (e.g. `1`), minor (e.g. `1.2`) to patch versions (e.g. `1.2.3`). * `` is either `bookworm` (for Debian Bookworm) or `alpine` (for the latest stable version of Alpine). [Browse tags](https://hub.docker.com/r/dunglas/frankenphp/tags). diff --git a/docs/fr/README.md b/docs/fr/README.md index 0fd709c51..c613f14a4 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -34,7 +34,7 @@ Rendez-vous sur `https://localhost`, c'est parti ! ### Binaire autonome Si vous préférez ne pas utiliser Docker, nous fournissons des binaires autonomes de FrankenPHP pour Linux et macOS -contenant [PHP 8.3](https://www.php.net/releases/8.3/fr.php) et la plupart des extensions PHP populaires. +contenant [PHP 8.4](https://www.php.net/releases/8.4/fr.php) et la plupart des extensions PHP populaires. Sous Windows, utilisez [WSL](https://learn.microsoft.com/windows/wsl/) pour exécuter FrankenPHP. diff --git a/docs/fr/docker.md b/docs/fr/docker.md index 386cad770..f66575dd5 100644 --- a/docs/fr/docker.md +++ b/docs/fr/docker.md @@ -2,7 +2,7 @@ Les images Docker de [FrankenPHP](https://hub.docker.com/r/dunglas/frankenphp) sont basées sur les [images PHP officielles](https://hub.docker.com/_/php/). Des variantes Debian et Alpine Linux sont fournies pour les architectures populaires. Les variantes Debian sont recommandées. -Des variantes pour PHP 8.2 et PHP 8.3 sont disponibles. [Parcourir les tags](https://hub.docker.com/r/dunglas/frankenphp/tags). +Des variantes pour PHP 8.2, 8.3 et 8.4 sont disponibles. [Parcourir les tags](https://hub.docker.com/r/dunglas/frankenphp/tags). ## Comment utiliser les images diff --git a/docs/tr/README.md b/docs/tr/README.md index 483bbc41f..ee4b238bd 100644 --- a/docs/tr/README.md +++ b/docs/tr/README.md @@ -34,7 +34,7 @@ docker run -v $PWD:/app/public \ ### Binary Çıktısı Docker kullanmayı tercih etmiyorsanız, Linux ve macOS için bağımsız FrankenPHP binary dosyası sağlıyoruz -[PHP 8.3](https://www.php.net/releases/8.3/en.php) ve en popüler PHP eklentilerini de içermekte: [FrankenPHP](https://github.com/dunglas/frankenphp/releases) indirin +[PHP 8.4](https://www.php.net/releases/8.4/en.php) ve en popüler PHP eklentilerini de içermekte: [FrankenPHP](https://github.com/dunglas/frankenphp/releases) indirin Geçerli dizinin içeriğini başlatmak için çalıştırın: diff --git a/docs/tr/docker.md b/docs/tr/docker.md index 27a3baf8b..4a8eda00c 100644 --- a/docs/tr/docker.md +++ b/docs/tr/docker.md @@ -2,7 +2,7 @@ [Resmi PHP imajları](https://hub.docker.com/_/php/) temel alınarak [FrankenPHP Docker imajları](https://hub.docker.com/r/dunglas/frankenphp) hazırlanmıştır. Popüler mimariler için Debian ve Alpine Linux varyantları sağlanmıştır. Debian dağıtımı tavsiye edilir. -PHP 8.2 ve PHP 8.3 için varyantlar sağlanmıştır. [Etiketlere göz atın](https://hub.docker.com/r/dunglas/frankenphp/tags). +PHP 8.2, 8.3 ve 8.4 için varyantlar sağlanmıştır. [Etiketlere göz atın](https://hub.docker.com/r/dunglas/frankenphp/tags). ## İmajlar Nasıl Kullanılır From 89aede259d41dccebec9ed3cb162880afc9435ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 22 Nov 2024 00:25:08 +0100 Subject: [PATCH 2/3] fix: revert to 8.3 for Static PHP CLI --- README.md | 2 +- build-static.sh | 2 +- docs/cn/README.md | 2 +- docs/fr/README.md | 2 +- docs/tr/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bb8b18d6b..a45f922c6 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Go to `https://localhost`, and enjoy! ### Standalone Binary If you prefer not to use Docker, we provide standalone FrankenPHP binaries for Linux and macOS -containing [PHP 8.4](https://www.php.net/releases/8.4/en.php) and most popular PHP extensions. +containing [PHP 8.3](https://www.php.net/releases/8.3/en.php) and most popular PHP extensions. On Windows, use [WSL](https://learn.microsoft.com/windows/wsl/) to run FrankenPHP. diff --git a/build-static.sh b/build-static.sh index 0d00d1c32..3c342cb63 100755 --- a/build-static.sh +++ b/build-static.sh @@ -42,7 +42,7 @@ if ! echo "${PHP_EXTENSION_LIBS}" | grep -q "\bbrotli\b"; then fi if [ -z "${PHP_VERSION}" ]; then - export PHP_VERSION="8.4" + export PHP_VERSION="8.3" fi if [ -z "${FRANKENPHP_VERSION}" ]; then diff --git a/docs/cn/README.md b/docs/cn/README.md index 59ef44a48..3228eaf7c 100644 --- a/docs/cn/README.md +++ b/docs/cn/README.md @@ -34,7 +34,7 @@ docker run -v $PWD:/app/public \ ### 独立二进制 如果您不想使用 Docker,我们为 Linux 和 macOS 提供独立的 FrankenPHP 二进制文件 -,其中包含 [PHP 8.4](https://www.php.net/releases/8.4/en.php) 和最流行的 PHP 扩展:[下载 FrankenPHP](https://github.com/dunglas/frankenphp/releases)。 +,其中包含 [PHP 8.3](https://www.php.net/releases/8.3/en.php) 和最流行的 PHP 扩展:[下载 FrankenPHP](https://github.com/dunglas/frankenphp/releases)。 若要启动当前目录的内容,请运行: diff --git a/docs/fr/README.md b/docs/fr/README.md index c613f14a4..0fd709c51 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -34,7 +34,7 @@ Rendez-vous sur `https://localhost`, c'est parti ! ### Binaire autonome Si vous préférez ne pas utiliser Docker, nous fournissons des binaires autonomes de FrankenPHP pour Linux et macOS -contenant [PHP 8.4](https://www.php.net/releases/8.4/fr.php) et la plupart des extensions PHP populaires. +contenant [PHP 8.3](https://www.php.net/releases/8.3/fr.php) et la plupart des extensions PHP populaires. Sous Windows, utilisez [WSL](https://learn.microsoft.com/windows/wsl/) pour exécuter FrankenPHP. diff --git a/docs/tr/README.md b/docs/tr/README.md index ee4b238bd..483bbc41f 100644 --- a/docs/tr/README.md +++ b/docs/tr/README.md @@ -34,7 +34,7 @@ docker run -v $PWD:/app/public \ ### Binary Çıktısı Docker kullanmayı tercih etmiyorsanız, Linux ve macOS için bağımsız FrankenPHP binary dosyası sağlıyoruz -[PHP 8.4](https://www.php.net/releases/8.4/en.php) ve en popüler PHP eklentilerini de içermekte: [FrankenPHP](https://github.com/dunglas/frankenphp/releases) indirin +[PHP 8.3](https://www.php.net/releases/8.3/en.php) ve en popüler PHP eklentilerini de içermekte: [FrankenPHP](https://github.com/dunglas/frankenphp/releases) indirin Geçerli dizinin içeriğini başlatmak için çalıştırın: From 2703280299a8d27ff20e0219593469359512c42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 22 Nov 2024 14:01:03 +0100 Subject: [PATCH 3/3] fix --- .github/workflows/docker.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 62ab22f76..5b9fa724b 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -52,7 +52,7 @@ jobs: PHP_83_LATEST=$(skopeo inspect docker://docker.io/library/php:8.3 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') PHP_84_LATEST=$(skopeo inspect docker://docker.io/library/php:8.4 --override-os linux --override-arch amd64 | jq -r '.Env[] | select(test("^PHP_VERSION=")) | sub("^PHP_VERSION="; "")') { - echo php_version="${PHP_84_LATEST},${PHP_84_LATEST}" + echo php_version="${PHP_82_LATEST},${PHP_83_LATEST},${PHP_84_LATEST}" echo php82_version="${PHP_82_LATEST//./-}" echo php83_version="${PHP_83_LATEST//./-}" echo php84_version="${PHP_84_LATEST//./-}" @@ -90,7 +90,9 @@ jobs: name: Create variants matrix if: ${{ !fromJson(steps.check.outputs.skip) }} id: matrix + shell: bash run: | + set -e METADATA="$(docker buildx bake --print | jq -c)" { echo metadata="${METADATA}"