It will be great when we can use the 4.0+ features, like setting return values for mocked methods and expecting specific calls.
Description
Details
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Resolved | Anomie | T110274 Fix PHPUnit version incompatibility between AuthManager and Jenkins | ||
Resolved | Krinkle | T122530 Upgrade PHP_CodeCoverage | ||
Resolved | Krinkle | T99982 Upgrade PHPUnit to 4.0+ | ||
Resolved | Krinkle | T112895 Support installing composer require-dev packages together with mediawiki/vendor | ||
· · · |
Event Timeline
The Jenkins job currently uses a stalled version of PHPUnit 3.7.x provided via a git repository. We will never update it. Instead the jobs will be using composer to bring in PHPUnit: T90303
Which repository is this for? If it's a MediaWiki extension it's blocked on T90303, but if it is something standalone, we can convert it to a composer test entry point with its own phpunit version.
I was asking in regards to the DonationInterface extension. For now, I found a handy @requires annotation that lets me run the newfangled tests locally without failing on older versions of PHPUnit.
So the first step to be able to use a newer PHPUnit version with extensions is to make core compatible with a newer PHPUnit version and add that newer version to core its composer.json . As long as it is also compatible with the old PHPUnit version it is not necessary to first solve the blocker T90303: Fetch dependencies using composer instead of cloning mediawiki/vendor for non-wmf branches. There are jobs for phpunit that have T90303 solved, but they are currently not used in the gate or test pipeline only in the experimental one. But those jobs still use the system wide PHPUnit. To be able to run a job with a PHPUnit installed via composer I created T112867.
Can we not like have files on disk? Name them sensibly, stage them (whether through puppet etc), and then use the version that composer suggests, rather than pulling it via composer?
, and then use the version that composer suggests, rather than pulling it via composer?
I think that would be more work, make it more complicated and be more fragile. What is the problem with pulling it via composer?
Change 270485 had a related patch set uploaded (by Krinkle):
[WIP] Upgrade from PHPunit 3.7.x to PHPUnit 4.8.x
Change 270504 had a related patch set uploaded (by Krinkle):
mw-phpunit: Remove spurious --conf parameter to phpunit
Change 270504 merged by jenkins-bot:
mw-phpunit: Remove spurious --conf parameter to phpunit
Change 270513 had a related patch set uploaded (by Paladox):
Use mediawiki path for the phpunit
Change 270515 had a related patch set uploaded (by Krinkle):
mw-phpunit: Remove default value for PHPUNIT_DIR
Change 270545 had a related patch set uploaded (by Krinkle):
mediawiki-core-code-coverage: Remove hardcoded phpunit-dir
Change 270515 merged by jenkins-bot:
Remove default PHPUNIT_DIR mw-phpunit.sh and mw-run-phpunit-allexts.sh
Change 270545 merged by jenkins-bot:
mediawiki-core-code-coverage: Remove hardcoded phpunit-dir