Page MenuHomePhabricator

Replace IP class with IPUtils (General)
Closed, ResolvedPublic

Description

The IP class in MW core is deprecated since 1.35, it should be replaced with IPUtils

This will require an use Wikimedia\IPUtils;, and also the required MW version bumping to >= 1.35 (which might cause codesniffer errors for other deprecated variables/classes)

This task is for non-Wikimedia deployed extensions. Extensions needing this change can be found in this code search.

  • examknow / CentralCheckUser
  • extensions / ArticleFeedbackv5
  • extensions / GlobalContributions
  • extensions / RegexBlock -- T248060
  • extensions / DonationInterface -- T248059
  • extensions / AnonPrivacy
  • extensions / BlueSpiceEditNotifyConnector
  • extensions / CookieWarning
  • extensions / DeviceMapLogCapture
  • extensions / GlobalBlocking
  • extensions / GlobalContribs
  • extensions / NetworkAuth
  • extensions / SecureSessions
  • femiwiki / Sanctions

Event Timeline

@Ammarpad Can I try and work on this? (cause it says lk non-Wikimedia deployed extensions...)

In addition to @Soda's question, I've two more questions that probably others can help answer:

  • Is the scope not too big for a good first task. I'm wondering if there should be separate tasks for separate extensions?
  • Who will be reviewing the submitted patches? Should the submitter try to find the authors/maintainers of the extension from the extension page on MediaWiki.org and add them as reviewers when they submit the patch in Gerrit? (for example: you could possibly add Werdna as a reviewer in Gerrit for a patch related to https://www.mediawiki.org/wiki/Extension:GlobalBlocking)

@Ammarpad Can I try and work on this? (cause it says lk non-Wikimedia deployed extensions...)

As Aklapper said, you should feel free to work on any. I divided the task into two, extensions deployed on Wikimedia wikis have been taken care of at T242556 , this other task is for the remaining extensions which are not in that set but hosted on Gerrit.

In addition to @Soda's question, I've two more questions that probably others can help answer:

  • Is the scope not too big for a good first task. I'm wondering if there should be separate tasks for separate extensions?

I think it will be fine either way, but I have not got time to create individual tasks. If anyone can help do that that will be fine.

  • Who will be reviewing the submitted patches? Should the submitter try to find the authors/maintainers of the extension from the extension page on MediaWiki.org and add them as reviewers when they submit the patch in Gerrit? (for example: you could possibly add Werdna as a reviewer in Gerrit for a patch related to https://www.mediawiki.org/wiki/Extension:GlobalBlocking)

If the submitter knows how to find and add authors/maintainers then that's fine. Otherwise I will endeavor to help them get it reviewed.

Change 579431 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalBlocking@master] Use IPUtils instead of deprecated IP class

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

Thanks @Ammarpad! I've added a list of extensions that needs work to the Phabricator task for easy tracking. Except for the GlobalBlocking extension (for which @DannyS712 submitted a patch recently) by, others can still be worked on.

Change 579431 merged by jenkins-bot:
[mediawiki/extensions/GlobalBlocking@master] Use IPUtils instead of deprecated IP class

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

Note: Extension:Moderation uses "master" compatibility policy (its master branch is backward compatible with MW 1.31), so it doesn't need this change yet. (not until hard deprecation of IP class)

Change 579524 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/GlobalContributions@master] Use IPUtils instead of deprecated IP class

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

Thanks @Ammarpad! I've added a list of extensions that needs work to the Phabricator task for easy tracking. Except for the GlobalBlocking extension (for which @DannyS712 submitted a patch recently) by, others can still be worked on.

Note: Extension:Moderation uses "master" compatibility policy (its master branch is backward compatible with MW 1.31), so it doesn't need this change yet. (not until hard deprecation of IP class)

Thanks, noted both.

Change 579556 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/GlobalContribs@master] Bump MW version, use IPUtils instead of deprecated IP class

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

Change 579524 merged by jenkins-bot:
[mediawiki/extensions/GlobalContributions@master] Bump MW version, use IPUtils instead of deprecated IP class

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

Change 579618 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/GlobalContribs@master] Bump MW version, remove deprecated $wgContLang() and IP class

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

Change 579556 abandoned by QEDK:
Bump MW version, use IPUtils instead of deprecated IP class

Reason:
See <https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GlobalContribs/ /579618>

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

The only reason I removed the tag was that it wouldn't show up in the list of latest tasks linked from https://www.mediawiki.org/wiki/Good_first_bugs (the way that Phabricator query works). It is fine though! I can maybe file subtasks for the remaining extensions sometime later.

Change 579685 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/CookieWarning@master] Bump MW version, remove deprecated IP class, update .gitignore

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

Change 579736 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/SecureSessions@master] Bump MW version, remove deprecated IP class, update .gitignore

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

Change 579738 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/DonationInterface@master] Bump MV version, remove deprecated IP class, update .gitignore

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

Change 579685 merged by jenkins-bot:
[mediawiki/extensions/CookieWarning@master] Bump MW version, remove deprecated IP class, update .gitignore

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

Change 579736 merged by jenkins-bot:
[mediawiki/extensions/SecureSessions@master] Bump MW version, remove deprecated IP class, update .gitignore

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

Change 579854 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/RegexBlock@master] Bump MW version, remove deprecated IP class, update .gitignore

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

Change 579855 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/AnonPrivacy@master] Include MW version, remove deprecated IP class

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

Change 579855 merged by jenkins-bot:
[mediawiki/extensions/AnonPrivacy@master] Include MW version, remove deprecated IP class

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

Change 580116 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/BlueSpiceEditNotifyConnector@master] Remove deprecated IP class with IPUtils, update .gitignore

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

Change 580118 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/DeviceMapLogCapture@master] Require MW version, remove deprecated IP class, update .gitignore

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

Change 580118 merged by jenkins-bot:
[mediawiki/extensions/DeviceMapLogCapture@master] Require MW version, remove deprecated IP class, update .gitignore

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

Change 580116 merged by Pwirth:
[mediawiki/extensions/BlueSpiceEditNotifyConnector@master] Remove deprecated IP class with IPUtils, update .gitignore

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

Change 580321 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/NetworkAuth@master] Remove deprecated IP class with IPUtils, update .gitignore

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

Change 580322 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/ArticleFeedbackv5@master] Bump MW version, remove deprecated IP class, update gitignore

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

Change 580322 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Bump MW version, remove deprecated IP class, update gitignore

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

Change 580321 merged by jenkins-bot:
[mediawiki/extensions/NetworkAuth@master] Remove deprecated IP class with IPUtils, update .gitignore

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

QEDK changed the task status from Open to Stalled.Mar 18 2020, 7:35 PM
QEDK removed projects: patch-welcome, good first task.
QEDK updated the task description. (Show Details)

Change 579618 merged by GeorgeBarnick:
[mediawiki/extensions/GlobalContribs@master] Bump MW version, remove deprecated $wgContLang() and IP class

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

These should remain I think. It's good for searching resolved tasks with the tag

Ammarpad assigned this task to QEDK.

Also there's nothing more to do here. I have created separate tasks for DI and RegexBlock so they can be in their backlogs and addressed once they can take it. Thanks all.