Modernize Docker test images & fix PHP 8.3 / 8.5 - #1596
Conversation
Use docker-php-extension-installer, resolve PHP-compatible dependencies, switch PHP 8.5 to the stable Alpine image, and optimize Docker builds with .dockerignore and Composer caching.
|
PHP-CS-Fixer issues not related to PR |
|
@endelwar I just tried to run
|
|
BuildKit is standard from Docker Engine 23 released in february 2023, which versione are your running? |
|
$ docker --version Edit: solved with a |
The
docker/Dockerfile{83,84,85}images used bymake testswere built with thenow-deprecated
pecl install, shipped the developer's localvendor/into theimage, and forced an incompatible Symfony version on PHP 8.3.
Changes
mongodbextension and Composer.peclis officially deprecated by the MongoDB PHP driver. Build deps are now auto-removed.mongodbon2.3.3across all three images (was 1.17.0 / 1.21.0 / 2.1.2).php:8.5-alpine(was8.5.0rc3-alpinewhich is unavailable) — the suite now runs on PHP 8.5.--ignore-platform-reqs: on the PHP 8.3 image it let Composer install Symfony 8.x (which requiresphp >=8.4.1) instead of the highest compatible release, so the whole suite failed to load with aParseErroron Symfony's property-hook syntax. Without the flag, PHP 8.3 resolves Symfony 7.4 and the suite passes.composer check-platform-reqsis green on all three images, so the flag was only bypassing the PHP version constraint — no required extension is missing..dockerignoreso avendor/built on the developer's machine is no longer copied into the Linux image.composer clear-cache): fast rebuilds without freezing dependency resolution.Results
All 356 tests pass on PHP 8.3, 8.4 and 8.5.