From d6f9977d57ae2fc06ea24a0051c206dbb17842e7 Mon Sep 17 00:00:00 2001 From: IanM Date: Sat, 1 Aug 2026 01:05:30 +0100 Subject: [PATCH] feat: show test warning details, and validate unit config against the installed phpunit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flarum's integration TestCase now reports repeated database queries as PHPUnit warnings — a query run once per record fails the test, one repeated for the same few values warns instead. PHPUnit only prints the detail of a warning when displayDetailsOnTestsThatTriggerWarnings is set; without it a run says 'Warnings: 11' and nothing about what they were. Both generated configs now set it, so extension authors get the finding rather than a count. The unit config also pointed at a remote 10.5 schema while the integration one used the installed copy. Flarum 2.x requires PHPUnit ^12.5, so the remote reference both drifts from what is installed and needs the network to validate. It now matches the integration config, which is what extensions in the wild use. Both configs validate against a real PHPUnit 12 schema. --- boilerplate/skeleton/extension/tests/phpunit.integration.xml | 1 + boilerplate/skeleton/extension/tests/phpunit.unit.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/boilerplate/skeleton/extension/tests/phpunit.integration.xml b/boilerplate/skeleton/extension/tests/phpunit.integration.xml index 364c445..a1fa7e0 100644 --- a/boilerplate/skeleton/extension/tests/phpunit.integration.xml +++ b/boilerplate/skeleton/extension/tests/phpunit.integration.xml @@ -6,6 +6,7 @@ cacheDirectory=".phpunit.cache" backupStaticProperties="false" colors="true" + displayDetailsOnTestsThatTriggerWarnings="true" processIsolation="true" stopOnFailure="false" > diff --git a/boilerplate/skeleton/extension/tests/phpunit.unit.xml b/boilerplate/skeleton/extension/tests/phpunit.unit.xml index eb33f60..fceb22b 100644 --- a/boilerplate/skeleton/extension/tests/phpunit.unit.xml +++ b/boilerplate/skeleton/extension/tests/phpunit.unit.xml @@ -1,11 +1,12 @@