Page MenuHomePhabricator

Support running MediaWiki PHPUnit tests via composer
Closed, ResolvedPublic

Description

Core composer.json already specifies 4.5: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/85d6495c9adc8e8eb3f914ff600cfd89e71d16f1/composer.json#L30 .

It seems like it could be changed in https://git.wikimedia.org/blob/integration%2Fphpunit.git/8402beb78f2b4c2bcc4e12195d82ca182cfe0dc3/composer.json pretty easily, but not sure if there are hidden issues (I would expect a few tests would need to be updated, but I'm wondering if there's anything bigger).

Details

Related Gerrit Patches:
integration/phpunit : masterUpdate PHPUnit to 4.5.0

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 16 2015, 2:24 AM
gerritbot added a subscriber: gerritbot.

Change 190765 had a related patch set uploaded (by BryanDavis):
Update PHPUnit to 4.5.0

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

Patch-For-Review

Change 190765 abandoned by BryanDavis:
Update PHPUnit to 4.5.0

Reason:
Per Krinkle's comment and the two prior abandoned attampts

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

bd808 set Security to None.
Krinkle closed this task as Declined.Feb 16 2015, 3:52 AM
Krinkle claimed this task.
Krinkle added a subscriber: Krinkle.

There are two reasons why we will not upgrade the global PHPUnit install:

  • Overall migration and compatibility: It's not just within MediaWiki core. There are a lot of repositories using this. And while it would take several months (given the low priority) to migrate Wikimedia-owned projects, we're hosting and providing continuous integration for lots of other repositories as well. Think "jQuery breaking change" migration in terms of expected impact and how long it takes to sink in.
  • We run tests against older branches (back ports and otherwise). We'd need to build logic into the platform at many levels to implement and expose version switching.

Instead, I'd rather we put our efforts in using our standard test entry points that allow individual repos (and branches) to specify what version to use and how to run it: https://www.mediawiki.org/wiki/Continuous_integration/Test_entry_points

MediaWiki core now states its compatible PHPUnit version in composer.json (devDependencies). Now we need to refactor the Jenkins job to use this.

Krinkle renamed this task from Upgrade PHPUnit on Jenkins to PHPUnit 4.5 to Support running MediaWiki PHPUnit tests via composer.Feb 16 2015, 3:55 AM
Krinkle reopened this task as Open.
Krinkle removed Krinkle as the assignee of this task.
Krinkle removed a project: Jenkins.
Krinkle removed a subscriber: gerritbot.
Krinkle added a subscriber: hashar.

@hashar previously did some work on this at https://gerrit.wikimedia.org/r/#/c/174840.

bd808 added a comment.Feb 16 2015, 3:58 AM

Apparently the plan for this is to switch to the per-repo phpunit setup described in Continuous_integration/Test_entry_points.

bd808 added a comment.Feb 16 2015, 4:01 AM

Apparently the plan for this is to switch to the per-repo phpunit setup described in Continuous_integration/Test_entry_points.

Comment added without reloading to see all the great changes @Krinkle had made. /me grumbles about phab and conflict detection.

What Timo said :-]  The shared PHPUnit repo is still used to test REL1_19! Lets move to composer so the repo/branch can pin whatever PHPUnit version they need.

hashar closed this task as Declined.Feb 20 2015, 3:49 PM
hashar claimed this task.
Mattflaschen-WMF reopened this task as Open.Feb 24 2015, 3:57 AM

What Timo said :-]  The shared PHPUnit repo is still used to test REL1_19! Lets move to composer so the repo/branch can pin whatever PHPUnit version they need.

This is now the bug for that (unless it's a dup).

Krinkle triaged this task as Medium priority.EditedMar 2 2015, 1:53 PM
Krinkle moved this task from Untriaged to Done on the Continuous-Integration-Infrastructure board.

Moving to Done from Continuous-Integration-Infrastructure since the infrastructure for this is now available. It's now up to T90303 to apply it to mediawiki-core.

hashar closed this task as Resolved.Mar 24 2015, 2:53 PM

Per Timo, the CI infrastructure work is done so there is not much point in keeping this task open. Whenever mediawiki/core is ready a new task can be created to request the switch to composer.