Page MenuHomePhabricator

Deprecate User::isWatched, addWatch, and removeWatch
Open, Needs TriagePublic

Description

Currently, watchlist management is available via the User class. Factoring it out helps with resolving the circular dependency between User and Title.

Calls to User::isWatched, addWatch, and removeWatch should be replaced with the respective calls to WatchedItemStore. Relevant permission checks must be retained, see T223165 for discussion as to how.

Event Timeline

daniel created this task.Nov 5 2018, 7:27 PM
daniel updated the task description. (Show Details)
Restricted Application added a project: Growth-Team. · View Herald TranscriptNov 5 2018, 7:29 PM

Since WatchedItemStore already exists, re-purposing this ticket to just call for isWatched, addWatch and removeWatch to be deprecated.

daniel renamed this task from Create a WatchlistManager service to Deprecate User::isWatched, addWatch, and removeWatch.Nov 8 2018, 12:57 PM
daniel updated the task description. (Show Details)
Catrope moved this task from Inbox to External on the Growth-Team board.Nov 13 2018, 8:48 AM
tosfos added a subscriber: tosfos.Apr 1 2019, 2:13 PM
tosfos reassigned this task from daniel to Vedmaka.Apr 1 2019, 2:13 PM

Change 504043 had a related patch set uploaded (by Vedmaka Wakalaka; owner: Vedmaka Wakalaka):
[mediawiki/core@master] Deprecates Users isWatched, addWatch, and removeWatch methods usage

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

Change 506885 had a related patch set uploaded (by Vedmaka Wakalaka; owner: Vedmaka Wakalaka):
[mediawiki/extensions/Flow@master] Replaces $user->removeWatch with WatchedItemStore service removeWatch call

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

Change 506886 had a related patch set uploaded (by Vedmaka Wakalaka; owner: Vedmaka Wakalaka):
[mediawiki/extensions/Wikibase@master] Replaces $user->addWatch call with WatchedItemStore addWatch service call

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

Change 506888 had a related patch set uploaded (by Vedmaka Wakalaka; owner: Vedmaka Wakalaka):
[mediawiki/extensions/Echo@master] Replaces $user->isWatched call with WatchedItemStore service isWatched call

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

Change 506891 had a related patch set uploaded (by Vedmaka Wakalaka; owner: Vedmaka Wakalaka):
[mediawiki/skins/Vector@master] Replaces $user->isWatching call with WatchedItemStore isWatching service call

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

DannyS712 updated the task description. (Show Details)Tue, Dec 10, 5:37 AM