Page MenuHomePhabricator

Deprecate use of Revision objects in WikiPage::doRollback and ::commitRollback
Closed, ResolvedPublic

Description

Currently alter an array passed by reference to effectively return Revision objects, will need a breaking change; no good way to effect deprecation of using the array values

Only use outside of core is in an echo script that uses it to generate test data

Plan:

  • Make internal in 1.35
  • Breaking change in 1.36 - don't provide revision objects

Event Timeline

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

Change 589792 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Echo@master] Remove rollback from generateSampleNotifications

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

DannyS712 updated the task description. (Show Details)May 6 2020, 12:55 AM

Change 589789 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Make WikiPage::commitRollback and ::doRollback internal

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

DannyS712 updated the task description. (Show Details)May 6 2020, 12:57 AM

(making sure that this shows up for Echo maintainers - cannot proceed with core until echo patch is merged)

Restricted Application added a project: Growth-Team. · View Herald TranscriptMay 7 2020, 3:25 AM

Can please someone from Growth-Team or whoever is maintaining the Notifications and Echo please review a very simple patch for Echo on this task? It's removing some test code cause it's using methods we intend to make internal for Revision class deprecation, and I do not know if the script is ever used or not.

Can please someone from Growth-Team or whoever is maintaining the Notifications and Echo please review a very simple patch for Echo on this task? It's removing some test code cause it's using methods we intend to make internal for Revision class deprecation, and I do not know if the script is ever used or not.

+2'ed, thanks for the nudge.

Change 589792 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Remove rollback from generateSampleNotifications

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

Change 589789 merged by jenkins-bot:
[mediawiki/core@master] Make WikiPage::commitRollback and ::doRollback internal

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

Change 606770 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] WikiPage::commitRollback - also return a RevisionRecord

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

Change 606770 merged by jenkins-bot:
[mediawiki/core@master] WikiPage::commitRollback - also return a RevisionRecord

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

Change 607926 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] WikiPage::commitRollback - use DeprecatablePropertyArray

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

Change 607926 merged by jenkins-bot:
[mediawiki/core@master] WikiPage::commitRollback - use DeprecatablePropertyArray

https://gerrit.wikimedia.org/r/c/mediawiki/core/ /607926

Next up: use a callback to only create the Revision objects when accessed, instead of always creating them. Will do after https://gerrit.wikimedia.org/r/c/mediawiki/core/+/604547 to avoid merge conflicts and keep things clear

Change 608842 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] WikiPage::commitRollback - deprecate accessing revision in DeprecatablePropertyArray

https://gerrit.wikimedia.org/r/c/mediawiki/core/ /608842

Change 608842 merged by jenkins-bot:
[mediawiki/core@master] WikiPage::commitRollback - deprecate accessing revision in DeprecatablePropertyArray

https://gerrit.wikimedia.org/r/c/mediawiki/core/ /608842

DannyS712 closed this task as Resolved.Jul 2 2020, 2:50 AM
DannyS712 removed a project: Patch-For-Review.

Use is now hard deprecated, and will be removed in 1.36

DannyS712 renamed this task from Remove use of Revision objects in WikiPage::doRollback and ::commitRollback to Deprecate use of Revision objects in WikiPage::doRollback and ::commitRollback.Jul 2 2020, 2:50 AM