Page MenuHomePhabricator

Use AbstractAuthenticationProvider ::init, ::postInitSetup instead of the setters of AbstractAuthenticationProvider in extensions
Closed, ResolvedPublic

Description

Usages of these methods were removed from the core.

Steps:

  1. Use https://codesearch.wmcloud.org/search/ tool to find all the usages of AbstractAuthenticationProvider ::setLogger, ::setManager, ::setConfig, ::setHookContainer 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 must be replaced with AbstractAuthenticationProvider::init. If it's overridden AbstractAuthenticationProvider::setConfig, so replace it with AbstractAuthenticationProvider::postInitSetup.
  3. Patches for all extensions that are not deployed should be created, but there's no requirement for them to get merged.
  4. When the patches of the deployed extensions will be merged, hard deprecate the setters.

Here is the parent patch - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/680327

WMF deployed

  • extensions / OATHAuth
  • extensions / AntiSpoof
  • extensions / ConfirmEdit
  • extensions / TitleBlacklist

Not WMF deployed

  • extensions / EmailAuth
  • extensions / PasswordlessLogin

Event Timeline

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

Vlad.shapik renamed this task from Hard deprecate AbstractAuthenticationProvider ::setLogger, ::setManager, ::setConfig, ::setHookContainer to Use AbstractAuthenticationProvider ::init, ::postInitSetup instead of the setters of AbstractAuthenticationProvider.May 6 2021, 2:54 PM
Vlad.shapik renamed this task from Use AbstractAuthenticationProvider ::init, ::postInitSetup instead of the setters of AbstractAuthenticationProvider to Use AbstractAuthenticationProvider ::init, ::postInitSetup instead of the setters of AbstractAuthenticationProvider in extensions.
Vlad.shapik reopened this task as Open.

Need to hard deprecate the setters of AbstractAuthenticationProvider.

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

[mediawiki/core@master] Hard deprecate the setters of AbstractAuthenticationProvider class

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

Change 697047 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate the setters of AbstractAuthenticationProvider class

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