Page MenuHomePhabricator

Hard deprecate Article::getRevision and WikiPage::getRevision
Closed, ResolvedPublic

Description

Return revision objects

Other classes that are unrelated defined getRevision methods. In deployed code, the following classes extend Article or WikiPage and calls to their methods need to be fixed as well:

Event Timeline

DannyS712 triaged this task as Medium priority.Apr 17 2020, 9:07 PM
DannyS712 created this task.
DannyS712 moved this task from Unsorted to In progress on the User-DannyS712 board.

Codesearch for use of getRevision: https://codesearch.wmflabs.org/deployed/?q=-%3EgetRevision%5C(%5C)&i=nope&files=&repos=

Uses relevant to these classes that need to be fixed:

  • TwoColConflict (MW 1.35+)
  • Wikibase (MW 1.35+)
  • Flow (MW 1.35+)
  • Echo (MW 1.35+)
  • Core

Since all extensions require MW 1.35+, no need to check if the replacement method (getRevisionRecord is there; it always is)

DannyS712 added a comment.EditedApr 17 2020, 9:14 PM

Uses of Article also need be replaced with WikiPage at the same time, Article::getRevisionRecord doesn't (and shouldn't) exist as a proxy

Change 589708 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/TwoColConflict@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589712 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Flow@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589755 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Echo@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589760 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Wikibase@master] Remove use of Article:: and WikiPage::getRevision()

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

Patches pending for all extensions that need to be updated; core replacements and hard deprecation will come once those are merged

Change 589760 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589712 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589708 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589796 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::getRevision and WikiPage::getRevision

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

Change 589755 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Remove use of Article:: and WikiPage::getRevision()

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

Change 589796 merged by jenkins-bot:
[mediawiki/core@master] Replace uses and hard deprecate Article:: and WikiPage::getRevision

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

DannyS712 closed this task as Resolved.Apr 20 2020, 11:32 PM
DannyS712 removed a project: Patch-For-Review.