Page MenuHomePhabricator

Prepare User group methods for hard deprecation
Open, MediumPublic

Description

The following methods in User are being replaced with UserGroupManager.

The goal of this task is to hard-deprecate the following methods:

  • public function getGroups()
  • public function getGroupMemberships()
  • public function getEffectiveGroups()
  • public function getAutomaticGroups()
  • public function getFormerGroups()
  • public function addGroup()
  • public function removeGroup()
  • public function addAutopromoteOnceGroups()

Steps:

  1. use https://codesearch.wmcloud.org/search/ tool to find all the usages of these methods in extensions. Make a list, WMF deployed extensions separately, not WMF deployed extensions separately (you can select Wikimedia deployed) in the tool
  2. All usages of deprecated methods in the deployed extensions need to be replaced with corresponding UserGroupManager methods. You can obtain UserGroupManager via MediaWikiServices::getInstance()->getUserGroupManager(), but it's preferred to inject it if possible.
  3. Patches for all extensions that are not deployed should be created, but there's no requirement for them to get merged.

WMF deployed

  • extensions / Translate
  • extensions / Wikibase
  • extensions / CheckUser
  • extensions / SecurePoll
  • extensions / UserMerge
  • extensions / WikibaseMediaInfo
  • operations/mediawiki-config
  • extensions / AbuseFilter
  • extensions / EventBus
  • extensions / LdapAuthentication
  • extensions / OAuth
  • extensions / Flow
  • extensions / BetaFeatures
  • extensions / CentralAuth
  • extensions / GlobalCssJs
  • extensions / CentralNotice

not WMF deployed

  • extensions / LDAPGroups
  • extensions / WikiLexicalData
  • extensions / BlueSpiceFoundation
  • extensions / SimpleSAMLphp
  • extensions / AbsenteeLandlord
  • extensions / AccessControl
  • extensions / ApprovedRevs
  • extensions / BatchUserRights
  • extensions / BlueSpiceDashboards
  • extensions / BlueSpiceFlaggedRevsConnector
  • extensions / BlueSpicePageAccess
  • extensions / BlueSpiceUserManager
  • extensions / BlueSpiceSMWConnector
  • extensions / ConfirmAccount
  • extensions / Farmer
  • extensions / ImportUsers
  • extensions / LinkFilter
  • extensions / RevisionCommentSupplement
  • extensions / SocialProfile
  • extensions / WikiToLDAP
  • mediawiki / vagrant
  • skins / Cosmos
  • skins / Tweeki
  • extensions / Auth_remoteuser
  • extensions / GlobalNotice
  • extensions / GroupsSidebar
  • extensions / GroupWhitelist
  • extensions / HAWelcome
  • extensions / Lockdown
  • extensions / LockDownEnglishPages
  • extensions / PageForms
  • extensions / PrivateDomains
  • extensions / Quantcast
  • extensions / RightFunctions
  • extensions / SemanticACL
  • extensions / SemanticPageSeries
  • extensions / ShoutWikiAds
  • extensions / ShoutWikiAPI
  • extensions / StaffPowers
  • extensions / UserFunctions
  • extensions / WikiForum
  • extensions / WSOAuth
  • extensions / DisableAccount
  • extensions / InviteSignup
  • extensions / Shibboleth

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
Resolved Pchelolo
OpenNone
ResolvedVlad.shapik
DuplicateNone
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedZabe
ResolvedDaimona
InvalidVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
Resolvedjeena
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
DuplicateNone
ResolvedVlad.shapik
OpenNone
InvalidNone
InvalidVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedZabe
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
Openashley
ResolvedVlad.shapik
OpenNone
ResolvedUniversal_Omega
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
OpenNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

11. ImportUsers
22. GroupsSidebar
33. SemanticPageSeries
44. MarkAsHelpful
55. SportsTeams
66. OpenID

Change 702607 had a related patch set uploaded (by Vlad.shapik; author: Vlad.shapik):

[mediawiki/core@master] WP:Hard deprecate User group methods

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

@Vlad.shapik Please remove Technical-Debt (Deprecation process) from your subtasks as that project is for tracking the deprecation and removal of the core method, not the migration of callers to it (which adds a lot of noise to the workboard currently, making it difficult to organise our work).

I would recommend avoiding the the "Create Subtask" button, or if you do use it to make sure you remove inherited project tags that should not apply to the subtask.

Change 702607 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User group methods

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

Change 727512 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/EditAccount@master] Replace deprecated User::getEffectiveGroups

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

Change 727514 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/GroupsSidebar@master] Replace deprecated User::getEffectiveGroups

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

Change 727515 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/HAWelcome@master] Replace deprecated User::getEffectiveGroups

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

Change 727515 abandoned by Umherirrender:

[mediawiki/extensions/HAWelcome@master] Replace deprecated User::getEffectiveGroups

Reason:

Let's use I9266ec97df83731d70f44fcb0f04045d7ec1821d for that

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

Change 727530 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/SemanticPageSeries@master] Replace deprecated User::getEffectiveGroups

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

Change 727512 merged by jenkins-bot:

[mediawiki/extensions/EditAccount@master] Replace deprecated User::getEffectiveGroups

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

Change 727514 merged by jenkins-bot:

[mediawiki/extensions/GroupsSidebar@master] Replace deprecated User::getEffectiveGroups

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

Change 727530 merged by jenkins-bot:

[mediawiki/extensions/SemanticPageSeries@master] Replace deprecated User::getEffectiveGroups

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

Change 817343 had a related patch set uploaded (by Zabe; author: Umherirrender):

[mediawiki/extensions/EditAccount@REL1_37] Replace deprecated User::getEffectiveGroups

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

Change 817343 merged by jenkins-bot:

[mediawiki/extensions/EditAccount@REL1_37] Replace deprecated User::getEffectiveGroups

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