Page MenuHomePhabricator

Finish hard-deprecation and removal of User methods depecated prior to MW 1.36
Open, MediumPublic

Description

User class has 48 soft-deprecated methods. In order to replace it with UserIdentity and Authority where possible we need to start removing usages of these methods.

This is an umbrella task for that work.

Strategy:

  1. Select a batch of @deprecated methods, usually it's better to group methods by service where the implementation was moved.
  2. Find an existing ticket, or file a new one, about hard-deprecating those methods.
  3. Remove usages in deployed extensions and core, hard-deprecate methods. When removing usages use DI if possible. When User type hints or PHPDoc is used and there's no longer need for a full User - update the type hints to accept UserIdentity.
  4. Repeat from point 1.

Status as of 2023-08-31:

Static methods:

  • newFromName
  • newFromId
  • newFromIdentity
  • newFromConfirmationCode

Instance methods:

  • isBlocked
  • isBlockedFrom
  • blockedFor
  • isBlockedGlobally
  • getGlobalBlock
  • setActorId
  • getOption
  • getTokenFromOption
  • getGroups
  • getGroupMemberships
  • addGroup
  • removeGroup
  • isBlockedFromCreateAccount
  • getEditTokenObject
  • getEditToken
  • matchEditToken
  • getGroupPermissions
  • getGroupsWithPermission
  • groupHasPermission
  • getAllGroups
  • getImplicitGroups

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
ResolvedVlad.shapik
ResolvedUmherirrender
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
ResolvedNone
InvalidNone
InvalidVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedZabe
ResolvedVlad.shapik
ResolvedVlad.shapik
InvalidNone
ResolvedVlad.shapik
ResolvedVlad.shapik
Resolvedashley
ResolvedVlad.shapik
ResolvedNone
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
ResolvedNone
ResolvedUmherirrender
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
DuplicateVlad.shapik
ResolvedVlad.shapik
ResolvedNone
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
DeclinedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
OpenNone
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedVlad.shapik
ResolvedZabe
ResolvedZabe
ResolvedZabe
ResolvedZabe
DeclinedNone
InvalidNone
ResolvedVlad.shapik

Event Timeline

Change 671702 had a related patch set uploaded (by Zabe; owner: Zabe):
[mediawiki/core@master] Hard deprecate User::clearNotification()

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

Change 671702 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate User::clearNotification()

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

Change 672804 had a related patch set uploaded (by Zabe; owner: Zabe):
[mediawiki/core@master] Hard deprecate User::getFirstEditTimestamp()

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

Change 673272 had a related patch set uploaded (by Zabe; owner: Zabe):
[mediawiki/core@master] Hard deprecate User::isIPRange()

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

Change 673272 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate User::isIPRange()

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

Change 672804 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate User::getFirstEditTimestamp() and ::getLatestEditTimestamp()

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

Change 674959 had a related patch set uploaded (by Zabe; author: Zabe):
[mediawiki/core@master] Hard deprecate User::isValidUserName()

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

Change 674959 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate User::isValidUserName()

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

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

[mediawiki/core@master] Hard deprecated User::getRights()

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

Change 693179 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User::getRights()

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

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

[mediawiki/core@master] Hard deprecate User::listOptionKinds()

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

Change 686498 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User::listOptionKinds()

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

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

[mediawiki/core@master] Hard deprecate User::getOptionKinds and ::resetOptions

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

Change 705192 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User::getOptionKinds and ::resetOptions

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

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

[mediawiki/core@master] Hard deprecate User::getIntOption

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

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

[mediawiki/core@master] Hard deprecate User::getIntOption

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

@Zabe it seems that there is related ticket for this patch --> T277600
Why do you mention the general ticket?

Change 705766 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User::getIntOption()

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

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

[mediawiki/core@master] Hard deprecate User::getIntOption

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

@Zabe it seems that there is related ticket for this patch --> T277600
Why do you mention the general ticket?

My mistake, I will mention the correct ticket in the future.

Change 963676 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@master] Hard deprecate User::isBlocked(), isBlockedFrom() and isBlockedFromCreateAccount()

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

Change 963676 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate User::isBlocked(), isBlockedFrom() and isBlockedFromCreateAccount()

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

Krinkle renamed this task from Hard-deprecate soft-deprecated User methods to Finish hard-deprecation and removal of User methods depecated prior to MW 1.37.Mar 27 2024, 6:50 PM
Krinkle renamed this task from Finish hard-deprecation and removal of User methods depecated prior to MW 1.37 to Finish hard-deprecation and removal of User methods depecated prior to MW 1.36.