Page MenuHomePhabricator

Remove the Revision class [1.37]
Open, MediumPublic

Description

Methods deprecated in T246284: Hard deprecate the Revision class can be removed

Specific subtasks:

No remaining callers - Revision and RevisionStore:

  • Revision::loadFromTitle and RevisionStore::loadRevisionFromTitle[1][2]
  • Revision::countByPageId and ::countByTitle[3][4]
  • Revision::userCan (callers removed in T247259: Remove remaining calls and hard deprecate Revision::userCan)
  • Revision::newKnownCurrent[5]
  • Revision::loadFromPageId[6]
  • Revision::loadFromTimestamp[7]
  • Revision::setTitle[8]
  • Revision::base36Sha1[9]
  • Revision::getQueryInfo and ::getArchiveQueryInfo[10]
  • Revision::isUnpatrolled[11]
  • Revision::setUserIdAndName[12]
  • Revision::getRecentChange[13]
  • Revision::getTextId[14]
  • RevisionInsertComplete hook[15]
  • Revision::getSerializedData[16]
  • Revision::newFromArchiveRow[17]
  • Revision::getSha1[18]

No remaining callers - accept or return a revision

  • LinksUpdate::setRevision and ::getRevision (see explanation at T249397)
  • EditPage::getBaseRevision[A]

No remaining uses - hooks

  • RevisionInsertComplete[B]
  • UndeleteShowRevision[C]
  • ArticleRevisionUndeleted[D]

[1] https://codesearch.wmflabs.org/search/?q=Revision%3A%3AloadFromTitle&i=nope&files=&repos=
[2] https://codesearch.wmflabs.org/search/?q=loadRevisionFromTitle&i=nope&files=&repos=
[3] https://codesearch.wmflabs.org/search/?q=countByPageId&i=nope&files=&repos=
[4] https://codesearch.wmflabs.org/search/?q=countByTitle&i=nope&files=&repos=
[5] https://codesearch.wmflabs.org/search/?q=%3A%3AnewKnownCurrent&i=nope&files=&repos=
[6] https://codesearch.wmflabs.org/search/?q=%3A%3AloadFromPageId&i=nope&files=&repos=
[7] https://codesearch.wmflabs.org/search/?q=Revision%3A%3AloadFromTimestamp&i=nope&files=&repos=
[8] https://codesearch.wmflabs.org/search/?q=-%3EsetTitle%5C(&i=nope&files=&repos=
[9] https://codesearch.wmflabs.org/search/?q=Revision%3A%3Abase36Sha1&i=nope&files=&repos=
[10] https://codesearch.wmflabs.org/search/?q=Revision%3A%3Aget(Archive)%3FQueryInfo&i=nope&files=%5C.php%24&repos=
[11] https://codesearch.wmflabs.org/search/?q=-%3EisUnpatrolled%5C(%5C)&i=nope&files=&repos=
[12] https://codesearch.wmflabs.org/search/?q=setUserIdAndName&i=nope&files=&repos=
[13] https://codesearch.wmflabs.org/search/?q=-%3EgetRecentChange%5C(&i=nope&files=&repos=
[14] https://codesearch.wmflabs.org/search/?q=-%3EgetTextId%5C(%5C)&i=nope&files=&repos=
[15] https://codesearch.wmflabs.org/search/?q=RevisionInsertComplete&i=nope&files=&repos=
[16] https://codesearch.wmflabs.org/search/?q=-%3EgetSerializedData%5C(%5C)&i=nope&files=&repos=
[17] https://codesearch.wmflabs.org/search/?q=Revision%3A%3AnewFromArchiveRow&i=nope&files=&repos=
[18] https://codesearch.wmflabs.org/search/?q=-%3EgetSha1%5C(%5C)&i=nope&files=&repos=
A - https://codesearch.wmflabs.org/search/?q=getBaseRevision&i=nope&files=&repos=
B - https://codesearch.wmflabs.org/search/?q=RevisionInsertComplete&i=nope&files=&repos=
C - https://codesearch.wmflabs.org/search/?q=UndeleteShowRevision&i=nope&files=&repos=
D - https://codesearch.wmflabs.org/search/?q=ArticleRevisionUndeleted&i=nope&files=&repos=

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
DannyS712 updated the task description. (Show Details)
DannyS712 updated the task description. (Show Details)
DannyS712 updated the task description. (Show Details)
DannyS712 changed the task status from Stalled to Open.Jul 14 2020, 9:50 AM
DannyS712 changed the status of subtask T248549: Remove Revision::getRevisionText from Stalled to Open.
DannyS712 changed the status of subtask T248424: Remove Revision::newFromPageId from Stalled to Open.
DannyS712 changed the status of subtask T248423: Remove Revision::getTimestampFromId from Stalled to Open.
DannyS712 changed the status of subtask T248036: Remove Revision::getParentLengths from Stalled to Open.
DannyS712 changed the status of subtask T246411: Remove Revision::userCanBitfield from Stalled to Open.
DannyS712 changed the status of subtask T245703: Remove Revision::newNullRevision from Stalled to Open.
DannyS712 changed the status of subtask T250705: Remove Revision::newFromTitle from Stalled to Open.
DannyS712 changed the status of subtask T254704: Remove Revision::newFromId from Stalled to Open.

Change 614026 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Video@master] Stop running the UndeleteShowRevision hook, require 1.36+

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

Change 614027 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove unused hooks that use Revision objects

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

Change 614027 abandoned by DannyS712:
[mediawiki/core@master] Remove unused hooks that use Revision objects

Reason:

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

Change 614026 abandoned by DannyS712:
[mediawiki/extensions/Video@master] Stop running the UndeleteShowRevision hook, require 1.36+

Reason:

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

DannyS712 renamed this task from Remove deprecated revision methods [1.36] to Remove the Revision class [1.37].Sep 29 2020, 12:32 PM
DannyS712 changed the task status from Open to Stalled.
DannyS712 removed a project: Patch-For-Review.

Waiting until 1.37

DannyS712 changed the status of subtask T248423: Remove Revision::getTimestampFromId from Open to Stalled.
DannyS712 changed the status of subtask T248424: Remove Revision::newFromPageId from Open to Stalled.
DannyS712 changed the status of subtask T246411: Remove Revision::userCanBitfield from Open to Stalled.
DannyS712 changed the status of subtask T248504: Remove Revision::newFromRow from Open to Stalled.
DannyS712 changed the status of subtask T245703: Remove Revision::newNullRevision from Open to Stalled.
DannyS712 changed the status of subtask T248549: Remove Revision::getRevisionText from Open to Stalled.
DannyS712 changed the status of subtask T250705: Remove Revision::newFromTitle from Open to Stalled.
DannyS712 changed the status of subtask T254704: Remove Revision::newFromId from Open to Stalled.
DannyS712 changed the task status from Stalled to Open.Sun, Apr 11, 8:41 PM

1.36 was branched, master is now 1.37

Change 678414 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Remove hooks that use Revision objects

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

Change 681377 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/FlaggedRevs@master] Stop running the NewRevisionFromEditComplete hook

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

Change 681379 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Start removing places using Revision objects

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

Change 681380 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/WikibaseMediaInfo@master] Stop mocking WikiPage::getRevision

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

Change 681381 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Remove Revision from PageArchive

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

Change 681644 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Linker: remove support for Revision parameters

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

Change 681380 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] WikibaseMediaInfoHooksTest: fix WikiPage mock

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

Change 681730 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] WikiPage: remove use of Revision objects

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

Change 681377 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Stop running the NewRevisionFromEditComplete hook

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

Change 678414 merged by jenkins-bot:

[mediawiki/core@master] Remove hooks that use Revision objects

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

Change 681379 merged by jenkins-bot:

[mediawiki/core@master] Start removing places using Revision objects

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

Change 681381 merged by jenkins-bot:

[mediawiki/core@master] Remove Revision from PageArchive

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

Change 683957 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Remove deprecated talk page message handling in User class

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

Change 683964 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Remove the rest of the places Revision objects are used

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

Change 683965 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] ApiRevisionDeleteTest: remove use of Revision objects

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

Change 683965 merged by jenkins-bot:

[mediawiki/core@master] ApiRevisionDeleteTest: remove use of Revision objects

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

Change 684071 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] EPIC: Remove the Revision class entirely

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

Change 684072 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Wikibase@master] Require MW 1.37+ and remove support for Revision objects

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

Change 684073 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/EntitySchema@master] Require MW 1.37+ and remove support for Revision objects

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

Change 684074 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/services/parsoid@master] Extension: require MW 1.37+ and remove support for Revision objects

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

Okay, we're getting close! Current status:
First couple patches, removing the hooks that use Revision objects and starting to remove deprecated support for Revision in other places, has already merged and will go out with the train.
Next batch is ready to go, but I'm waiting until after the train to split them up a bit. Once https://gerrit.wikimedia.org/r/c/mediawiki/core/+/683964 merges, the only remaining use of Revision in core will be in the Revision class itself, and in its tests. At that point

  • update extensions that, like core, supported deprecated Revision object parameters: Wikibase (repo), EntitySchema, and Parsoid
  • Wait for a new version of Parsoid to be tagged and deployed to vendor
  • Wait at least a week since the rest of the changes to remove the uses of the Revision class in core

Then we can merge the actual removal (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/684071)

Change 684075 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Post Revision-removal cleanup

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

Change 681644 merged by jenkins-bot:

[mediawiki/core@master] Linker: remove support for Revision parameters

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

Change 681730 merged by jenkins-bot:

[mediawiki/core@master] WikiPage: remove use of Revision objects

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

Change 683957 merged by jenkins-bot:

[mediawiki/core@master] Remove deprecated talk page message handling in User class

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

Change 683964 merged by jenkins-bot:

[mediawiki/core@master] Remove remaining non-test uses of Revision objects

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

Okay, we're getting close! Current status:
First couple patches, removing the hooks that use Revision objects and starting to remove deprecated support for Revision in other places, has already merged and will go out with the train.
Next batch is ready to go, but I'm waiting until after the train to split them up a bit. Once https://gerrit.wikimedia.org/r/c/mediawiki/core/+/683964 merges, the only remaining use of Revision in core will be in the Revision class itself, and in its tests. At that point

  • update extensions that, like core, supported deprecated Revision object parameters: Wikibase (repo), EntitySchema, and Parsoid
  • Wait for a new version of Parsoid to be tagged and deployed to vendor
  • Wait at least a week since the rest of the changes to remove the uses of the Revision class in core

Then we can merge the actual removal (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/684071)

Update: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/683964 has merged, so the only use of Revision objects in core is in the Revision class itself and its tests. Now its time to update extensions that still support Revision object parameters:

Change 684074 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Extension: require MW 1.37+ and remove support for Revision objects

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