From 18ae0474aa1e52c50e3138a749f5c617898602d0 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Tue, 28 Jul 2026 13:50:57 +0200 Subject: [PATCH 1/3] Add support for PHP 8.5 images --- .github/workflows/publish.yaml | 1 + .github/workflows/test.yaml | 3 ++- ci/build/Dockerfile | 6 +++++- ci/test/run-general.sh | 5 ++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5e21b91..2ec743e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,6 +12,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" node_version: - 16 - 18 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8af02f0..e15cf87 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: integration_test: strategy: matrix: - php_version: [8.1, 8.2, 8.3, 8.4] + php_version: [8.1, 8.2, 8.3, 8.4, 8.5] testsuite: [general, brancher] runs-on: ubuntu-latest steps: @@ -34,6 +34,7 @@ jobs: code_quality: strategy: matrix: + # PHP 8.5 is not yet compatible with our current version of deployer php_version: [8.1, 8.2, 8.3, 8.4] runs-on: ubuntu-latest steps: diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index d870d20..1439f57 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -71,7 +71,6 @@ RUN apt-get install -y --no-install-recommends \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-mysql \ php${PHP_VERSION}-odbc \ - php${PHP_VERSION}-opcache \ php${PHP_VERSION}-pgsql \ php${PHP_VERSION}-pspell \ php${PHP_VERSION}-readline \ @@ -81,6 +80,11 @@ RUN apt-get install -y --no-install-recommends \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip +# Since PHP 8.5 opcache is compiled into PHP itself and no separate package exists +RUN if dpkg --compare-versions "${PHP_VERSION}" lt "8.5"; then \ + apt-get install -y --no-install-recommends php${PHP_VERSION}-opcache; \ + fi + # Confirm NodeJS & NPM are installed RUN node -v && npm -v diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index a82e1d0..f2a6f15 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -4,7 +4,7 @@ set -e set -x export PHP_VERSION_SHORT=$(echo "${PHP_VERSION:-8.2}" | sed 's/\.//') -if [[ "${PHP_VERSION:-8.2}" == "8.4" ]]; then +if [[ "${PHP_VERSION:-8.2}" == "8.4" || "${PHP_VERSION:-8.2}" == "8.5" ]]; then export IMAGE_OS="bookworm" else export IMAGE_OS="buster" @@ -12,6 +12,9 @@ fi if [[ "${PHP_VERSION:-8.2}" == "8.1" ]]; then export MAGENTO_VERSION="2.4.6-p10" +elif [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then + # Magento 2.4.9 is the first release compatible with PHP 8.5 + export MAGENTO_VERSION="2.4.9" else export MAGENTO_VERSION="2.4.8" fi From df257dc561f61e67c5a8c56446a4f21271d2fe39 Mon Sep 17 00:00:00 2001 From: poespas Date: Tue, 28 Jul 2026 15:18:26 +0200 Subject: [PATCH 2/3] Use the MySQL 8.4 image for the PHP 8.5 integration tests The php85-mysql57 image is not pullable: its tag and manifest resolve, but 9 of its 13 layer blobs are missing from the registry, so CI died with "unknown blob" before running a single test. Magento 2.4.9 -- the first release compatible with PHP 8.5, already pinned for this row -- only supports MySQL 8.4, so MySQL 5.7 was never the right database here to begin with. Parameterize the mysql part of the image name and point the 8.5 row at php85-mysql84, which is complete in the registry. All other PHP versions keep using mysql57. --- ci/test/run-general.sh | 7 +++++++ docker-compose.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index f2a6f15..e8a12eb 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -10,6 +10,13 @@ else export IMAGE_OS="buster" fi +if [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then + # Magento 2.4.9 only supports MySQL 8.4, and there is no mysql57 image for PHP 8.5 + export MYSQL_VERSION_SHORT="84" +else + export MYSQL_VERSION_SHORT="57" +fi + if [[ "${PHP_VERSION:-8.2}" == "8.1" ]]; then export MAGENTO_VERSION="2.4.6-p10" elif [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then diff --git a/docker-compose.yaml b/docker-compose.yaml index 0772eba..0329dbd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: hypernode: container_name: hypernode - image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql57 + image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql${MYSQL_VERSION_SHORT:-57} volumes: - ./ci/test/.ssh:/root/.ssh ports: From 4f88bf40e513acef1854890cfc2e0309fb721fc0 Mon Sep 17 00:00:00 2001 From: poespas Date: Tue, 28 Jul 2026 16:23:48 +0200 Subject: [PATCH 3/3] Chown the Magento install to app before rsyncing it to the deploy container The commands in this script run as root inside the Hypernode container, while the rsync that copies the installed Magento to the deploy container authenticates over SSH as app. On Magento 2.4.9 that combination breaks: var/cache/symfony ends up unreadable for app, so rsync fails with opendir "/data/web/magento2/var/cache/symfony" failed: Permission denied (13) rsync error: some files/attrs were not transferred (code 23) Chowning the tree to app first makes the ownership match the SSH user -- which is also how a real Hypernode looks, where app owns the application. 2.4.6-p10 and 2.4.8 do not hit this, so only the PHP 8.5 row was failing. --- ci/test/run-general.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index e8a12eb..5f43571 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -91,6 +91,8 @@ $HN /data/web/magento2/bin/magento app:config:dump scopes themes echo "Waiting for SSH to be available on the Hypernode container" chmod 0600 ci/test/.ssh/id_rsa chmod 0600 ci/test/.ssh/authorized_keys +# Magento 2.4.9 creates a root-owned var/cache/symfony that the app user below cannot read +$HN chown -R app:app /data/web/magento2 $DP rsync -a app@hypernode:/data/web/magento2/ /web $DP rsync -a /config/ /web $DP rm /web/app/etc/env.php