Page MenuHomePhabricator

Update giorgiosironi/eris in mediawiki/core for php8.4 support / PHPUnit 10 support
Open, Needs TriagePublic

Description

mediawiki/core require-dev giorgiosironi/eris (maybe not using it), this is also require-dev by WikibaseLexeme.

V0.14 declares Compatibility

  • PHP 7.4, 8.0, 8.1, 8.2
  • PHPUnit 8.x, 9.x

V1.1 declares Compatibility

  • PHP 8.1, 8.2, 8.3, 8.4
  • PHPUnit 10.x, 11.x, 12.x, 13.x

Update is required to support PHP 8.4 support ("Implicitly marking parameter $exception as nullable is deprecated, the explicit nullable type must be used instead"), it seems php8.5 is not supported yet

But it must be updated together with PHPUnit 10 (T328919: Upgrade PHPUnit in MediaWiki code to PHPUnit 10)
The first update results in a revert (see T406470: Wikibase/WikibaseLexeme CI broken: PHP Fatal error: An alias (traitDumpSeedForReproducing) was defined for method dumpSeedForReproducing(), but this method does not exist), for more information, about broken WikibaseLexeme.

Cannot removed from core due to T220723#11977696

Event Timeline

rMW25e6dbdb1a41: Install giorgiosironi/eris as require-dev suggests it was added for WikibaseLexeme specifically, which blames T188354: Remove phpunit/phpunit dependencies from extensions's composer.json.

MathSearch has an apparent useage statement, which is unused (according to PhpStorm).. Otherwise it's all WikibaseLexeme.

There's other entries in core's composer.json that have been added to core because $reasons, such as hamcrest/hamcrest-php.

If we can work out a way to remove these from core, and back to the repos they're used in... And not break their tests, we really should get this done!

The HamcrestPHPUnitIntegration trait is used by more extensions:
https://codesearch.wmcloud.org/search/?q=HamcrestPHPUnitIntegration