Page MenuHomePhabricator

PHPUnit infra should check for out-of-date composer.json like update.php does
Closed, ResolvedPublic

Description

There are fairly routine issues (like https://gerrit.wikimedia.org/r/c/mediawiki/core/+/889944) caused by folks running phpunit tests without having run composer update to get their libraries up to date. The failures tend to be very obscure and not obviously related to the root cause (aka outdated libraries).

To prevent folks from losing time on this sort of thing, phpunit.php (or the bootstrap class, see T90875) should perform the same check for an out-of-date composer.json that maintenance/update.php does.

Event Timeline

Change 891802 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] phpunit: Check if composer dependencies are up-to-date

https://gerrit.wikimedia.org/r/891802

Change 900672 had a related patch set uploaded (by Krinkle; author: Kosta Harlan):

[mediawiki/core@REL1_40] phpunit: Check if composer dependencies are up-to-date

https://gerrit.wikimedia.org/r/900672

Change 900672 merged by jenkins-bot:

[mediawiki/core@REL1_40] phpunit: Check if composer dependencies are up-to-date

https://gerrit.wikimedia.org/r/900672

Change 891802 merged by jenkins-bot:

[mediawiki/core@master] phpunit: Check if composer dependencies are up-to-date

https://gerrit.wikimedia.org/r/891802

Change 903829 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] phpunit: Use error() in CheckComposerLockUpToDate for pre-fatal details

https://gerrit.wikimedia.org/r/903829

Change 903829 merged by jenkins-bot:

[mediawiki/core@master] phpunit: Use error() in CheckComposerLockUpToDate for pre-fatal details

https://gerrit.wikimedia.org/r/903829