It will be great when we can use the 4.0+ features, like setting return values for mocked methods and expecting specific calls.
|integration/config : master||mediawiki-core-code-coverage: Remove hardcoded phpunit-dir|
|mediawiki/core : master||Upgrade from PHPunit 3.7.x to PHPUnit 4.8.x|
|integration/jenkins : master||Remove default PHPUNIT_DIR mw-phpunit.sh and mw-run-phpunit-allexts.sh|
|integration/jenkins : master||Use mediawiki path for the phpunit|
|integration/jenkins : master||mw-phpunit: Remove spurious --conf parameter to phpunit|
|· · ·|
|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|
|· · ·|
- Mentioned In
- T112867: make CI for extensions able to run PHPUnit from composer instead of a system wide installation
T122530: Upgrade PHP_CodeCoverage
T112895: Support installing composer require-dev packages together with mediawiki/vendor
T124599: Use PHPUnit 4.8 for PHP5.5 unit tests
T110274: Fix PHPUnit version incompatibility between AuthManager and Jenkins
- Mentioned Here
- T124599: Use PHPUnit 4.8 for PHP5.5 unit tests
T112867: make CI for extensions able to run PHPUnit from composer instead of a system wide installation
T90303: Fetch dependencies using composer instead of cloning mediawiki/vendor for non-wmf branches
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.
, 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?