Hard deprecate User::blockedFor

Deprecated since 1.35, unused in Wikimedia code.

Change-Id: I79eb801331f4ff7d02332b9aa7c085ac0564d9d5
This commit is contained in:
Matěj Suchánek 2022-06-21 22:40:11 +02:00
parent 1e42da2762
commit 857d9d80f9
3 changed files with 4 additions and 0 deletions

View file

@ -373,6 +373,7 @@ because of Phabricator reports.
* MWTimestamp::getHumanTimestamp(), deprecated in 1.26, now emits deprecation
warnings.
* Article::viewRedirect(), deprecated in 1.30, now emits deprecation warnings.
* User::blockedFor(), deprecated in 1.35, now emits deprecation warnings.
* …
=== Other changes in 1.39 ===

View file

@ -1785,9 +1785,11 @@ class User implements Authority, UserIdentity, UserEmailContact {
* If user is blocked, return the specified reason for the block.
*
* @deprecated since 1.35 Use AbstractBlock::getReasonComment instead
* Hard deprecated since 1.39.
* @return string Blocking reason
*/
public function blockedFor() {
wfDeprecated( __METHOD__, '1.35' );
$this->getBlockedStatus();
return $this->mBlockreason;
}

View file

@ -1044,6 +1044,7 @@ class UserTest extends MediaWikiIntegrationTestCase {
*/
public function testBlockInstanceCache() {
$this->hideDeprecated( 'User::blockedBy' );
$this->hideDeprecated( 'User::blockedFor' );
$this->hideDeprecated( 'User::getBlockId' );
// First, check the user isn't blocked
$user = $this->getMutableTestUser()->getUser();