Skip to content

Build php 8.5 image#1

Merged
scrummer merged 3 commits into
open-dxp:1.xfrom
KRANKIKOM:feature/php8.5
Jun 4, 2026
Merged

Build php 8.5 image#1
scrummer merged 3 commits into
open-dxp:1.xfrom
KRANKIKOM:feature/php8.5

Conversation

@HageMaster3108
Copy link
Copy Markdown
Contributor

@HageMaster3108 HageMaster3108 commented Jun 3, 2026

PHP 8.5 has been around for a while now, probably best to be prepared to migrate there by having a docker baseimage ready ;-)

Admittedly, couldn't test the GH workflow because this would've required modifying the workflow definition in my fork repo, but I did validate whether the build works as per below.

Re the opcode module change:
https://stackoverflow.com/questions/79826535/docker-php-ext-install-opcache-works-with-php-8-4-but-not-php-8-5


Testing performed

Validated locally that the PHP 8.5 image builds and that all bundled
extensions compile against PHP 8.5, before relying on CI.

Environment

  • Docker 29.3.1, Buildx/BuildKit v0.28.1
  • Host: macOS / Apple Silicon → built linux/arm64 natively (no QEMU)
  • Base image: php:8.5-fpm-bookworm (PHP 8.5.6, built 2026-05-19)

Build

The debug target chains mindefaultdebug, so building it
exercises every version-sensitive step in one pass (all docker-php-ext-install
extensions plus the PECL extensions amqp, apcu, imagick, redis, xdebug):

    --platform linux/arm64 \
    --target opendxp_php_debug \
    --build-arg PHP_VERSION=8.5 \
    --build-arg DEBIAN_VERSION=bookworm \
    -t opendxp85:debug .

Result: build succeeds (exit 0). Extensions compiled on 8.5.6:
amqp-2.2.0, apcu-5.1.28, imagick-3.8.1, redis-6.3.0, xdebug-3.5.1.

Smoke checks (mirroring .github/workflows/test.yml):

  docker run --rm opendxp85:debug php -v
  # → PHP 8.5.6, with Xdebug v3.5.1, with Zend OPcache v8.5.6

  docker run --rm opendxp85:debug sh -c 'php -m | grep -i imagick'   # imagick
  docker run --rm opendxp85:debug sh -c 'php -m | grep -i xdebug'    # xdebug
  docker run --rm opendxp85:debug \
    test -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini      # present
  docker run --rm opendxp85:debug \
    php -r 'exit(extension_loaded("Zend OPcache") ? 0 : 1);'         # OPcache active

Note — required fix: as of PHP 8.5, OPcache is compiled statically into
the PHP core, so docker-php-ext-install opcache fails with
cp: cannot stat 'modules/*': No such file or directory
(see docker-library/php#1631, php-src#20557). This PR version-gates the
opcache install (PHP_VERSION_ID < 80500), leaving 8.2–8.4 unchanged.

@HageMaster3108 HageMaster3108 changed the title Feature/php8.5 Build php 8.5 image Jun 3, 2026
@scrummer
Copy link
Copy Markdown
Member

scrummer commented Jun 4, 2026

@HageMaster3108 Thank you very much

I just needed to fix/update some workflow definitions. Can you update your PR? Then we are happy to merge it :)

@scrummer scrummer merged commit 390dbaa into open-dxp:1.x Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants