Skip to content

History of commits

4473 commits

ci: show the line coverage of every area in the summary of a run

Nothing measured coverage, and the source list of PHPUnit named eight modules out of twenty. The list now takes system/src and the src of every module of every vendor, so a module added later is measured as well. The check job runs the tests once more under pcov and turns the Clover report into a table by area — the core by its top directory, every module on its own, the least covered first — in the summary of the run. There is no threshold: it is a map of where tests are missing.
simba77 23. okt 2026 21:24 Branch: 10.x 4f87908

test: run the tests in random order

A test that relies on process state it does not set passes in one order and fails in another, and a fixed order hides it for as long as the order holds. PHPUnit now shuffles the tests on every run, failed ones still first, and prints the seed to repeat a run with. The first runs found one such test.
simba77 23. okt 2026 21:22 Branch: 10.x 39e5986

test(http): clear the request state before each factory test too

RequestFactoryTest cleared the trusted proxies, the trusted hosts and the configuration after each test, and assumed them clear before. A functional test run earlier in the same process leaves the configuration of the site and its trusted proxies behind, so in that order the test of an empty configuration found the proxies of the stand. The state is now cleared on both sides.
simba77 23. okt 2026 21:22 Branch: 10.x 63b83d2

docs(agents): pin the behaviour of untested code before refactoring it

Most legacy modules have no tests, and a refactoring checked only by tests written alongside it says nothing about whether the behaviour was kept. The testing guide now asks for characterization tests committed ahead of the change, and the refactoring principles point there.
simba77 23. okt 2026 21:13 Branch: 10.x 69b06ec

test(functional): run the functional suite against MySQL and MariaDB

The suite ran on SQLite alone while every site runs on MySQL or MariaDB, so a migration, a query or a page that only those break on went unseen. CI now runs the functional suite once more against MySQL 5.7 and 8.4 and MariaDB 10.2 and 11: the oldest servers the system check accepts and a current one of each. TEST_DATABASE_URL points the harness at a server. The suite drops that database and builds the schema anew with the migrations, so FunctionalDatabase refuses a name that does not end in _test. MySQL commits the open transaction before DDL and TRUNCATE, and what a test wrote until then stayed for every test after it. The harness now fails the test whose transaction was gone by the time it ended. The first run caught the system check, which created a table on every visit. The crawl opens the pages SQLite cannot serve when it runs against MySQL.
simba77 23. okt 2026 21:12 Branch: 10.x 0a5e4c9

fix(admin): check the database driver without creating a table

The system check made sure the driver returns integers as integers by creating a table, writing a row, reading it back and dropping the table, on every visit to the page. A host that grants no right to create tables got a broken page, and under MySQL the DDL committed whatever transaction was open. A number selected without a table tells as much about the driver: mysqlnd hands it back as an int, a driver that stringifies hands back a string.
simba77 23. okt 2026 21:08 Branch: 10.x b5b6e14

test(functional): open every page as a guest, a member and the staff

RouteCrawlTest reads the routes from the router and opens every GET route that needs no placeholder filled, three times over: 145 routes, 434 visits. A new page is covered the moment it is declared. Every page has to answer without a server error, finish the document it starts and put the CSRF token into each form that posts; the panel has to let nobody in but the staff, and the staff has to be refused nothing. The one page left out for the staff reads the version of MySQL, which SQLite does not have. When a page answers 500, the test asks again with catch: false, a new argument of handleRequest(), and reports the exception the kernel would have logged, so the cause shows in CI as well. FunctionalUserFactory hashes the shared password once per process. bcrypt costs a tenth of a second here, and the crawl alone signs in about three hundred accounts: 46 seconds against 6.
simba77 23. okt 2026 21:01 Branch: 10.x d0ff8f2

fix(mail): build the file service with its storage

The services file of the module declared MailFileService on a line of its own, after the load() that already registered it. That line replaced the autowired definition with a bare one, which went unnoticed while the constructor took nothing. Since the service got its storage, every page asking for it failed with an ArgumentCountError: a conversation, sending a message, the list of files and every delete. The line is gone; load() registers the service as it does the rest. The container test now holds every definition to the arguments its constructor requires. Such a definition compiles fine and fails only on the page that needs it, so nothing else in the gate saw this one.
simba77 23. okt 2026 21:01 Branch: 10.x b083f98