From b9f04fbf8b038e280232c7516e2ae33aef993cc5 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Fri, 9 Oct 2026 13:04:24 +0200 Subject: [PATCH] feat: install ParaTest in the image (#12) paratest runs the test files in parallel processes and merges the coverage of its workers itself, which is what sharding a suite across CI jobs cannot do: PHPUnit does not merge XML coverage reports from several runs, so each shard is left with a partial one and nothing to join them with. It costs a require line and a symlink, because the hard part was already here. paratest is a Composer package and needs phpunit/phpunit in its own vendor tree, which is usually what makes it awkward beside a PHAR; the vendor-bin/phpunit tree already holds one, pulled by the extensions it exists for. "^7" rather than a precise version, because the PHP of the build decides: paratest 7.26 asks for PHP 8.4 and PHPUnit 13.4, 7.20 for PHP 8.3 and PHPUnit 12.5, 7.8 for PHP 8.2 and PHPUnit 11.5. Composer resolves the newest that runs there, and the PHPUnit it brings is the newest that runs there too, the same bound the PHAR loop uses for /tools/phpunit, so the two land on the same version without either being pinned. Resolved in the image of every version the build targets, on the tree's own require block: 8.2 gives paratest 7.8.6 with PHPUnit 11.5.57, 8.3 gives 7.20.0 with 12.5.38, 8.5 gives 7.26.0 with 13.4.1, none of them in conflict with what the tree already requires. A build for 8.5 then answers "ParaTest v7.26.0" on the PATH and through "composer exec", with both PHPUnit at 13.4.1. --- ARCHITECTURE.md | 2 +- Dockerfile | 16 +++++++++++++++- README.md | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d4e0061..c7f78bf 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -32,7 +32,7 @@ phpqa/ ### 1. Image Docker (`Dockerfile`) Image Docker construite en deux étapes (`php:X.Y-cli` pour compiler, `debian:slim` à l'exécution) avec : -- Uniquement les outils QA appelés par les tâches Castor (PHPStan, ECS, Rector, Deptrac, PHPUnit, Infection, parallel-lint, Mago) +- Uniquement les outils QA appelés par les tâches Castor (PHPStan, ECS, Rector, Deptrac, PHPUnit, ParaTest, Infection, parallel-lint, Mago) - Castor pré-installé (binaire statique) - Les extensions PHP nécessaires aux projets Symfony/Doctrine - Le layout `/tools/.composer/vendor-bin/...` hérité de `jakzal/phpqa`, référencé par les projets diff --git a/Dockerfile b/Dockerfile index 92f7831..9c8faec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,9 +122,22 @@ COPY <