Page MenuHomePhabricator

Replace deprecated "User::makeGroupLinkHTML" method in extensions
Closed, ResolvedPublic

Description

In https://phabricator.wikimedia.org/rMW73224f4f8b8a26b9a9a04e338bb1c3c2f163a820 several methods of the User class were deprecated. Methods of the UserGroupMembership class should be used instead, and the function calls are not exactly identical.

Running a grep for makeGroupLinkHTML on all extensions indicated that these use cases currently exist and need to be updated:

extensions/WikiForum/includes/WikiForum.class.php:				User::makeGroupLinkHTML( 'sysop', User::getGroupMember( 'sysop', $username ) )
extensions/WikiForum/includes/WikiForum.class.php:				User::makeGroupLinkHTML( 'forumadmin', User::getGroupMember( 'forumadmin', $username ) )
extensions/CheckUser/specials/SpecialCheckUser.php:			$cache[$group] = User::makeGroupLinkHTML(
extensions/ConfirmAccount/frontend/specialpages/actions/UserCredentials_body.php:			$list[] = User::makeGroupLinkHTML(

A similar check should be conducted for other deprecated functions as well.

This is a parent task; for each extension a subtask can be created, or a patch can be submitted towards this parent task.

Event Timeline

Adding TTO so he is aware.

I would have left out the non-WMF-installed extensions on purpose, hoping that the extension maintainers would read the 1.29 release notes and remove the functions themselves. I'm surprised I missed CheckUser though...

Aklapper renamed this task from Deprecated methods of the User class should be replaced in other extensions to Replace deprecated "User::makeGroupLinkHTML" method in extensions.Dec 4 2017, 9:30 AM
Aklapper updated the task description. (Show Details)

CheckUser seems to have been fixed in the meantime?

Change 407928 had a related patch set (by Matěj Suchánek) published:
[mediawiki/extensions/ConfirmAccount@master] Replace deprecated methods

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

Change 407931 had a related patch set (by Matěj Suchánek) published:
[mediawiki/extensions/WikiForum@master] Replace deprecated methods

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

Change 407931 merged by jenkins-bot:
[mediawiki/extensions/WikiForum@master] Replace deprecated methods

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

Change 407928 merged by jenkins-bot:
[mediawiki/extensions/ConfirmAccount@master] Replace deprecated methods

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