Page MenuHomePhabricator

Hard deprecate Revision::getPage
Closed, ResolvedPublic

Description

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

Looks like a lot of uses, but there are other methods by that name; since Revision::getPage returns int|null, its fairly easy to find the calls on Revision objects, since they cannot be ->getPage()->foo().

  • CentralNotice
  • Jade
  • Replace core uses
  • Hard deprecate

Event Timeline

DannyS712 triaged this task as Medium priority.May 5 2020, 2:38 AM
DannyS712 created this task.
DannyS712 moved this task from Unsorted to In progress on the User-DannyS712 board.

Change 594342 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CentralNotice@master] Remove use of WikiPage::doEditContent and the Revision object returned

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

Change 594342 abandoned by DannyS712:
Remove use of WikiPage::doEditContent and the Revision object returned

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

Change 604174 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CentralNotice@master] Remove use of the revision returned in WikiPage::doEditContent

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

Change 604175 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Jade@master] Remove use of the Revision object returned in WikiPage::doEditContent

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

Change 604179 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove use of the Revision object returned in WikiPage::doEditContent

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

Change 604175 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Remove use of the Revision object returned in WikiPage::doEditContent

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

Change 604174 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Remove use of the Revision object returned in WikiPage::doEditContent

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

DannyS712 updated the task description. (Show Details)Jun 10 2020, 12:19 AM

Change 604191 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ApiRollback: Reduce use of Revision objects

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

Change 604179 merged by jenkins-bot:
[mediawiki/core@master] Remove use of the Revision object returned in WikiPage::doEditContent

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

Change 604197 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove use of the Revision object returned in WikiPage::doEditContent (2)

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

Change 604207 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] RevisionStoreDbTestBase: Reduce use of Revision from WikiPage::doEditContent

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

Change 604191 merged by jenkins-bot:
[mediawiki/core@master] ApiRollback: Reduce use of Revision objects

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

Change 604197 merged by jenkins-bot:
[mediawiki/core@master] Remove use of the Revision object returned in WikiPage::doEditContent (2)

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

Change 604207 merged by jenkins-bot:
[mediawiki/core@master] RevisionStoreDbTestBase: Reduce use of Revision from WikiPage::doEditContent

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

There are a number of methods with the same name, making searching for existing uses hard. That being said, I could not find any remaining deployed uses outside of tests, and I believe that we can hard deprecate the method. If I missed any of the uses, there would be some logspam, but no code should break. Once the deprecation is merged, I'll leave a note on the blockers task for the week with a heads-up

Change 604237 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Revision::getPage

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

Change 604237 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Revision::getPage and ::getComment

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

DannyS712 closed this task as Resolved.Jun 10 2020, 5:01 AM
DannyS712 removed a project: Patch-For-Review.