#110483Nightly min jobs fail: recordTestRunHistory requires PHPUnit 13.3
Description
Problem
The nightly pipeline of main fails in every “min” job since the upgrade to
PHPUnit 13. Example: pipeline 106678 of 2026-08-14, where 61 of 111 jobs
failed. All of them are “unit … min” or “functional … min” jobs, on every
DBMS. The “locked” and “max” jobs are green.
The min jobs do not fail a test. They run to the end and report:
bc. PHPUnit 13.2.6 by Sebastian Bergmann and contributors.
1) Test results may not be as expected because the XML configuration file did not pass validation:
Element ‘phpunit’, attribute ‘recordTestRunHistory’: The attribute ‘recordTestRunHistory’ is not allowed.
OK, but there were issues!
Tests: 11691, Assertions: 20649, PHPUnit Warnings: 1, Skipped: 13.
A PHPUnit runner warning is enough for a non-zero exit code, so the job fails
although no test failed at all.
Cause
The upgrade to PHPUnit 13 replaced the deprecated “cacheResult” attribute with
“recordTestRunHistory” in Build/phpunit/UnitTests.xml and in
Build/phpunit/FunctionalTests.xml. That rename is correct and is the one
intended by upstream, but the attribute was only added in PHPUnit 13.3.0, in
the very same release which deprecated “cacheResult”.
composer.json declares phpunit/phpunit with the constraint ^13.2.6, so
composerInstallMin resolves 13.2.6, while composer.lock pins 13.3.0. Locked and
max jobs therefore never see the attribute, min jobs do and reject it. None of
the schema files shipped with PHPUnit up to and including 13.2 knows it.
The XML files additionally still reference the 13.2 schema. PHPUnit itself does
not read that reference, it validates against the schema of the installed
version, but IDEs do and would flag the attribute as invalid.
Solution
Raise the development dependency phpunit/phpunit to ^13.3.0 and reference the
13.3 schema in both PHPUnit configuration files. Nothing moves in the lock file,
which already holds 13.3.0.