Skip to content

Commit 8ef63d0

Browse files
authored
Merge pull request #200 from ByteInternet/add-support-for-php8.5-image
Add support for PHP 8.5 images
2 parents 7b0de2b + 4f88bf4 commit 8ef63d0

5 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
- "8.2"
1313
- "8.3"
1414
- "8.4"
15+
- "8.5"
1516
node_version:
1617
- 16
1718
- 18

.github/workflows/test.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
integration_test:
77
strategy:
88
matrix:
9-
php_version: [8.1, 8.2, 8.3, 8.4]
9+
php_version: [8.1, 8.2, 8.3, 8.4, 8.5]
1010
testsuite: [general, brancher]
1111
runs-on: ubuntu-latest
1212
steps:
@@ -34,6 +34,7 @@ jobs:
3434
code_quality:
3535
strategy:
3636
matrix:
37+
# PHP 8.5 is not yet compatible with our current version of deployer
3738
php_version: [8.1, 8.2, 8.3, 8.4]
3839
runs-on: ubuntu-latest
3940
steps:

ci/build/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ RUN apt-get install -y --no-install-recommends \
7171
php${PHP_VERSION}-mbstring \
7272
php${PHP_VERSION}-mysql \
7373
php${PHP_VERSION}-odbc \
74-
php${PHP_VERSION}-opcache \
7574
php${PHP_VERSION}-pgsql \
7675
php${PHP_VERSION}-pspell \
7776
php${PHP_VERSION}-readline \
@@ -81,6 +80,11 @@ RUN apt-get install -y --no-install-recommends \
8180
php${PHP_VERSION}-xml \
8281
php${PHP_VERSION}-zip
8382

83+
# Since PHP 8.5 opcache is compiled into PHP itself and no separate package exists
84+
RUN if dpkg --compare-versions "${PHP_VERSION}" lt "8.5"; then \
85+
apt-get install -y --no-install-recommends php${PHP_VERSION}-opcache; \
86+
fi
87+
8488
# Confirm NodeJS & NPM are installed
8589
RUN node -v && npm -v
8690

ci/test/run-general.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ set -e
44
set -x
55

66
export PHP_VERSION_SHORT=$(echo "${PHP_VERSION:-8.2}" | sed 's/\.//')
7-
if [[ "${PHP_VERSION:-8.2}" == "8.4" ]]; then
7+
if [[ "${PHP_VERSION:-8.2}" == "8.4" || "${PHP_VERSION:-8.2}" == "8.5" ]]; then
88
export IMAGE_OS="bookworm"
99
else
1010
export IMAGE_OS="buster"
1111
fi
1212

13+
if [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then
14+
# Magento 2.4.9 only supports MySQL 8.4, and there is no mysql57 image for PHP 8.5
15+
export MYSQL_VERSION_SHORT="84"
16+
else
17+
export MYSQL_VERSION_SHORT="57"
18+
fi
19+
1320
if [[ "${PHP_VERSION:-8.2}" == "8.1" ]]; then
1421
export MAGENTO_VERSION="2.4.6-p10"
22+
elif [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then
23+
# Magento 2.4.9 is the first release compatible with PHP 8.5
24+
export MAGENTO_VERSION="2.4.9"
1525
else
1626
export MAGENTO_VERSION="2.4.8"
1727
fi
@@ -81,6 +91,8 @@ $HN /data/web/magento2/bin/magento app:config:dump scopes themes
8191
echo "Waiting for SSH to be available on the Hypernode container"
8292
chmod 0600 ci/test/.ssh/id_rsa
8393
chmod 0600 ci/test/.ssh/authorized_keys
94+
# Magento 2.4.9 creates a root-owned var/cache/symfony that the app user below cannot read
95+
$HN chown -R app:app /data/web/magento2
8496
$DP rsync -a app@hypernode:/data/web/magento2/ /web
8597
$DP rsync -a /config/ /web
8698
$DP rm /web/app/etc/env.php

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
hypernode:
33
container_name: hypernode
4-
image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql57
4+
image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql${MYSQL_VERSION_SHORT:-57}
55
volumes:
66
- ./ci/test/.ssh:/root/.ssh
77
ports:

0 commit comments

Comments
 (0)