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
OpenVlad.shapik
OpenPchelolo
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
OpenVlad.shapik
OpenVlad.shapik
DuplicateNone
OpenVlad.shapik
OpenVlad.shapik
InvalidNone
InvalidVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
OpenVlad.shapik
ResolvedZabe
OpenVlad.shapik
OpenVlad.shapik
InvalidNone
ResolvedVlad.shapik
OpenVlad.shapik
Openashley
OpenVlad.shapik
OpenVlad.shapik
ResolvedUniversal_Omega
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
ResolvedVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
InvalidNone
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenVlad.shapik
OpenNone

Event Timeline

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

@Vlad.shapik with the projects you added, 277 people are now receiving notifications for every update on this task. I think that's entirely unnecessary, can we please figure out something better than these mega tasks?

@Vlad.shapik: Was the removal of project tags intentional (e.g. to create dedicated subtasks for each extension)?

My question is who is planning to do the work? If you expect extension maintainers to do it, then dedicated subtasks make sense. If one or two people are going to do it, then I don't think we need dedicated tasks, just send the patches and maintainers will review them accordingly.

My question is who is planning to do the work? If you expect extension maintainers to do it, then dedicated subtasks make sense. If one or two people are going to do it, then I don't think we need dedicated tasks, just send the patches and maintainers will review them accordingly.

I and @ jeena are working on the ticket. We will update these codebases anyway. So dedicated subtasks don't make sense.

Since necessary subtasks for each codebase will be created, the tags were removed from the ticket.

Zabe updated the task description. (Show Details)

11. ImportUsers
22. GroupsSidebar
33. SemanticPageSeries

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