Page MenuHomePhabricator

Drop support for PHPUnit 4.x
Open, Stalled, LowPublic

Description

Once we drop support for any PHP/HHVM version that pretends to be less than 7.0, we can drop support for PHPUnit 4, and deprecate our forwards/backwards-compat layer.

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

Related Objects

StatusAssignedTask
StalledNone
StalledNone
StalledNone
OpenNone
OpenNone
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedMoritzMuehlenhoff
ResolvedNone
ResolvedQuiddity
ResolvedLadsgroup
ResolvedJoe
ResolvedLegoktm
ResolvedLegoktm
Resolvedhashar
Resolvedhashar
Resolvedssastry
ResolvedSmalyshev
ResolvedLegoktm
Resolvedtstarling
Resolvedtstarling
OpenNone
ResolvedNone
OpenNone
ResolvedNone
ResolvedDzahn
ResolvedRobH
ResolvedCmjohnson
ResolvedMoritzMuehlenhoff
ResolvedPapaul
ResolvedSmalyshev
Resolvedjcrespo
ResolvedJdforrester-WMF
Resolvedaaron
ResolvedJoe
ResolvedJoe
ResolvedKrinkle
ResolvedBPirkle
ResolvedJoe
ResolvedJoe
OpenNone
ResolvedJoe
ResolvedAnomie
ResolvedAnomie
OpenNone
OpenNone
ResolvedTgr
Resolvedjijiki
OpenMoritzMuehlenhoff
ResolvedArielGlenn
OpenNone
OpenJoe
OpenNone

Event Timeline

Jdforrester-WMF triaged this task as Low priority.
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 updated the task description. (Show Details)
Krinkle changed the task status from Open to Stalled.
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.