Page MenuHomePhabricator

Hard deprecate Revision::getContent
Closed, ResolvedPublic

Description

There are a number of methods with the same name, making searching for existing uses hard. That being said, I believe the only remaining uses are:

  • (EntitySchema) EntitySchemaContentHandler::getUndoContent - only when Revision objects are passed, which is deprecated and doesn't occur in production
  • (WikiBase) EntityHandler::getUndoContent - only when Revision objects are passed, which is deprecated and doesn't occur in production
  • (Translate) TranslateEditAddons::displayOnDiff - only when DifferenceEngine::getNewRevision isn't callable, i.e. for previous versions on mediawiki, not an issue in production
  • (Core) ContentHandler::getUndoContent - only when Revision objects are passed, which is deprecated and doesn't occur in production
  • (Core) RevisionStoreDbTestBase
  • (Core) RevisionDbTest
  • (Core) RevisionTest
  • (Core) ApiRevisionDeleteTest
  • (Core) WikiPageDbTest

Thus, 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

Event Timeline

DannyS712 triaged this task as Medium priority.Jun 8 2020, 2:37 AM
DannyS712 created this task.

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

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

Change 603090 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Revision::getContent

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