Page MenuHomePhabricator

Use GetUserBlock hook instead of deprecated GetBlockedStatus
Closed, ResolvedPublic

Description

The GetBlockedStatus hook was deprecated in T229035, because it works by manipulating public block properties on the User object, and allows for these to become inconsistent (see original task for more details).

RegexBlock should be updated to use the GetUserBlock hook instead. GetUserBlock passes in a clone of the user, so manipulating properties on this object will not have any effect. GetUserBlock passes in the block, which may be null or some type of AbstractBlock - this object should be changed if necessary.

Until this update is made, unit tests should be updated to expect a deprecation warning to be emitted about the use of getBlockedStatus.

Event Timeline

Change 544979 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/RegexBlock@master] Update MediaWiki version constraints in extension.json

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

Change 544979 merged by Jforrester:
[mediawiki/extensions/RegexBlock@master] Update MediaWiki version constraints in extension.json

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

Change 640702 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/RegexBlock@master] Update RegexBlock for MW 1.35+/the new blocking system

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

Change 640702 merged by Jack Phoenix:
[mediawiki/extensions/RegexBlock@master] Update RegexBlock for MW 1.35+/the new blocking system

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

Change 840292 had a related patch set uploaded (by Lewis Cawte; author: Jack Phoenix):

[mediawiki/extensions/RegexBlock@REL1_35] Update RegexBlock for MW 1.35+/the new blocking system

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

Change 840292 abandoned by Lewis Cawte:

[mediawiki/extensions/RegexBlock@REL1_35] Update RegexBlock for MW 1.35+/the new blocking system

Reason:

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

Change 840292 restored by Lewis Cawte:

[mediawiki/extensions/RegexBlock@REL1_35] Update RegexBlock for MW 1.35+/the new blocking system

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

Change 840292 merged by Lewis Cawte:

[mediawiki/extensions/RegexBlock@REL1_35] Update RegexBlock for MW 1.35+/the new blocking system

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