From ce737b9dface64b69065ecc545d2cc792c8d106f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <323649642+oc-tmueller@users.noreply.github.com> Date: Mon, 21 Sep 2026 17:55:38 +0200 Subject: [PATCH] ci: fail the PHP Unit build when a PHP extension fails to install [10.16] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #41848. setup-php treats a failed extension as a warning, not an error: it prints "✗ Could not install ..." and lets the step succeed. The job then runs on until something misses the extension. For the Oracle leg that produces a misleading failure. When oci8 fails to install, the job dies half a minute later in Install Server with [InvalidArgumentException] Database is not supported. because maintenance:install validates --database against the list that OC\Setup::getSupportedDatabases() derives from the *loaded PHP extensions* - so a missing oci8 presents as a database misconfiguration rather than as the extension problem it is. The real cause is further up the log, in a step that reported success. Setting fail-fast makes the Setup PHP step itself fail, with the "✗ oci8" line as its last output. Unlike master, this branch still has the matrix strategy.fail-fast set to true - #41695 was never backported - so the two settings compose here: a Setup PHP failure cancels the sibling database legs. The comment records why that is tolerable for the way ci.yml calls this workflow today, oci8 being the only extension in the list that downloads anything and Oracle already having a single-database call of its own. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com> --- .github/workflows/php-unit.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/php-unit.yml b/.github/workflows/php-unit.yml index e5940c0f9fb..0a08c24515f 100644 --- a/.github/workflows/php-unit.yml +++ b/.github/workflows/php-unit.yml @@ -78,6 +78,20 @@ jobs: php-version: ${{ matrix.php }} extensions: curl, gd, json, xml, zip, imagick${{ startsWith(matrix.database,'oracle:') && ', oci8' || '' }} ini-values: "memory_limit=2048M" + env: + # A failed extension is only a warning to setup-php, so without this the + # job carries on and dies later in Install Server with a misleading + # "Database is not supported" - maintenance:install derives the + # supported databases from the loaded extensions, so a missing oci8 looks + # like a database misconfiguration. + # + # Note this is setup-php's own option, not the matrix strategy.fail-fast + # above - but with that set to true the two compose, so a failed extension + # cancels the sibling database legs. Tolerable as ci.yml calls this today: + # oci8 is the only extension that downloads anything (the others come with + # setup-php's own PHP build and are merely enabled), and Oracle gets a + # single-database call of its own with no siblings to cancel. + fail-fast: true - name: Install ffmpeg & imagemagick run: |