Page MenuHomePhabricator

Upgrade PHPUnit from 4/6 to 8
Open, Stalled, LowPublic

Description

Once we drop support for HHVM and < PHP 7.2, we can drop support for PHPUnit 6, and deprecate our forwards/backwards-compat layer for PHPUnit 4.

This is blocked on: T192166: Drop HHVM support from MediaWiki

Related Objects

StatusAssignedTask
StalledNone
StalledNone
OpenNone
OpenNone
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedNone
ResolvedQuiddity
ResolvedLadsgroup
ResolvedJoe
ResolvedLegoktm
ResolvedLegoktm
Resolvedhashar
Resolvedhashar
Resolvedssastry
ResolvedSmalyshev
ResolvedLegoktm
Resolvedtstarling
Resolvedtstarling
Opentstarling
Resolvedtstarling
OpenNone
ResolvedNone
OpenNone
ResolvedNone
ResolvedDzahn
ResolvedRobH
ResolvedCmjohnson
ResolvedMoritzMuehlenhoff
ResolvedPapaul
ResolvedSmalyshev
Resolvedjcrespo
ResolvedJdforrester-WMF
ResolvedNone
OpenNone
Resolvedaaron
ResolvedJoe
ResolvedJoe
ResolvedKrinkle
ResolvedBPirkle
ResolvedJoe
ResolvedJoe
ResolvedGilles
ResolvedJoe
ResolvedAnomie
ResolvedAnomie
ResolvedKrinkle
Resolvedjijiki
ResolvedTgr
Resolvedjijiki
ResolvedMoritzMuehlenhoff
ResolvedArielGlenn
DuplicateNone
ResolvedReedy
ResolvedJoe
ResolvedKrinkle
Open thcipriani
ResolvedDzahn
OpenNone
Resolvedjijiki
ResolvedNone
ResolvedNone
Invalidjijiki

Event Timeline

Jdforrester-WMF triaged this task as Low priority.Apr 13 2018, 6:30 PM
Jdforrester-WMF created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 13 2018, 6:30 PM

Change 426058 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] [DNM] tests: Require PHPUnit 6, drop PHPUnit 4 as an option

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

Legoktm updated the task description. (Show Details)Apr 13 2018, 6:34 PM
Krinkle renamed this task from Drop support for PHP Unit 4.x to Drop support for PHPUnit 4.x.Apr 16 2018, 11:33 PM
Krinkle changed the task status from Open to Stalled.Apr 18 2018, 10:52 PM
Krinkle updated the task description. (Show Details)
Krinkle added a subscriber: Krinkle.EditedSep 15 2018, 10:18 PM

I'll leave the "Drop HHVM" dependency for now, but please note that it is most unlikely that HHVM isn't incompatible with newer versions of PHPUnit.

The only reason PHPUnit 4 is installed in Jenkins job using HHVM is because Composer looks at its version string (5.6.99-hhvm) and refuses to install PHPUnit 6 because it requires PHP 7. To my knowledge, all PHP7 features used by PHPUnit 6 are supported by HHVM. It's just a matter of Composer not supporting that.

This could be worked around in various ways, including by setting { "platform": { "php": "7.0" } } inside composer.json, which will make it resolve the dependency based on that version instead of the one that HHVM reflects via PHP_VERSION.

This might be a good idea regardless, because setting the platform version in composer.json means updates to mediawiki/vendor will also be more deterministic. For example, currently, if developers use PHP 7.3 locally when they run composer update, there is a chance some of the composer dependency-resolution logic will provide versions of a package that don't work on PHP 7.1.

Krinkle changed the task status from Stalled to Open.Sep 15 2018, 10:18 PM

Un-stalling in case someone is interested in exploring the above.

Krinkle changed the task status from Open to Stalled.Sep 15 2018, 11:45 PM

.. and back to stalled. PHPUnit 6 started using scalar type hints, which HHVM (unlike most of its php7 features) it only enables in php7.all mode, which we don't use for reasons.

Reedy moved this task from Backlog to MediaWiki core on the PHP 7.0 support board.Jun 8 2019, 11:50 PM

Change 426058 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] [DNM] tests: Require PHPUnit 6, drop PHPUnit 4 as an option

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

Krinkle renamed this task from Drop support for PHPUnit 4.x to Upgrade PHPUnit from 4/6 to 8.Jul 11 2019, 3:09 PM
Krinkle removed a project: PHP 7.0 support.
Krinkle updated the task description. (Show Details)
Krinkle added a subscriber: RazeSoldier.

Considering that we plan to directly support PHP 7.2+ in the future. We should use PHPUnit 8 after droping support for 4.X and 6.X. PHPUnit 7 does not support PHP 7.4, so it is not the first choice.

Indeed. These should all happen in rapid succession leading up to MW 1.34, so let's centralise the discussion and progress to this task.

Izno added a subscriber: Izno.Jul 11 2019, 8:34 PM