Skip to content

Support the MediaWiki 1.46 PHPUnit test runner#77

Merged
malberts merged 2 commits into
masterfrom
ci-new-phpunit-entrypoint
Jul 1, 2026
Merged

Support the MediaWiki 1.46 PHPUnit test runner#77
malberts merged 2 commits into
masterfrom
ci-new-phpunit-entrypoint

Conversation

@malberts

@malberts malberts commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Problem

MediaWiki 1.46 removes tests/phpunit/phpunit.php. The CI PHPUnit steps call it directly, so the master matrix row (1.46-dev) fails at the "Run PHPUnit" step:

Could not open input file: tests/phpunit/phpunit.php

Changes

  • Gate the PHPUnit step on the presence of the old entrypoint: where tests/phpunit/phpunit.php exists (MW <= 1.45), keep the current invocation; on newer MediaWiki, fetch the core phpunit.xml.template, generate the runner config with composer phpunit:config, and run vendor/bin/phpunit against the extension's test directory. This mirrors the approach already used for Chameleon and BootstrapComponents.
  • Add a REL1_46 matrix row (experimental) so the new path is exercised on a stable branch, not only on master.
  • Remove the code coverage step and its upload. The coverage step re-ran the whole suite on every job, and the upload used the codecov bash uploader (sunset in 2022), so it produced and uploaded nothing. The suite now runs once per job.

Note on coverage

Rather than repair the dead uploader, coverage is dropped for now. This keeps SimpleBatchUpload consistent with the rest of the stack, where coverage is not collected (Chameleon and FontAwesome have none; BootstrapComponents' coverage path exists but is disabled).

Switching to the maintained codecov/codecov-action was considered but deferred: it requires the repository to be onboarded to Codecov with a CODECOV_TOKEN secret, and it would make this the only extension in the stack reporting coverage. Whether to (re)introduce coverage is better decided stack-wide than bolted on here.

MediaWiki 1.46 removes tests/phpunit/phpunit.php, so the CI PHPUnit steps
failed on the master matrix row with "Could not open input file:
tests/phpunit/phpunit.php".

Gate both PHPUnit steps on the presence of that entrypoint: keep the existing
invocation where it exists, and on newer MediaWiki generate the runner config
from the core template (composer phpunit:config) and invoke vendor/bin/phpunit
directly. Add a REL1_46 matrix row so the new path is exercised on a stable
branch as well.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@malberts malberts marked this pull request as ready for review July 1, 2026 08:18
The coverage step re-ran the whole suite on every job, and the upload used the
codecov bash uploader that was sunset in 2022, so it collected and uploaded
nothing. No other extension in the stack gathers coverage. Run the suite once
per job.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@malberts malberts merged commit 87e55d3 into master Jul 1, 2026
14 checks passed
@malberts malberts deleted the ci-new-phpunit-entrypoint branch July 1, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant