Hard deprecate User::blockedby(), User::getblockid()
Bug: T290869 Change-Id: If2d96705223bd80ffd68526773a2c81aaeaa898d
This commit is contained in:
parent
6c3b3844d5
commit
12b42e8023
3 changed files with 12 additions and 0 deletions
|
|
@ -146,6 +146,10 @@ because of Phabricator reports.
|
||||||
should be used instead.
|
should be used instead.
|
||||||
* SkinTemplate::getPersonalToolsList(), deprecated since 1.35, now emits
|
* SkinTemplate::getPersonalToolsList(), deprecated since 1.35, now emits
|
||||||
deprecation warnings.
|
deprecation warnings.
|
||||||
|
* The following methods from the User class were hard deprecated:
|
||||||
|
- ::blockedBy
|
||||||
|
- ::getBlockId
|
||||||
|
|
||||||
* …
|
* …
|
||||||
|
|
||||||
=== Other changes in 1.38 ===
|
=== Other changes in 1.38 ===
|
||||||
|
|
|
||||||
|
|
@ -1972,8 +1972,11 @@ class User implements Authority, UserIdentity, UserEmailContact {
|
||||||
/**
|
/**
|
||||||
* If user is blocked, return the name of the user who placed the block
|
* If user is blocked, return the name of the user who placed the block
|
||||||
* @return string Name of blocker
|
* @return string Name of blocker
|
||||||
|
* @deprecated since 1.38
|
||||||
|
* Hard deprecated since 1.38.
|
||||||
*/
|
*/
|
||||||
public function blockedBy() {
|
public function blockedBy() {
|
||||||
|
wfDeprecated( __METHOD__, '1.38' );
|
||||||
$this->getBlockedStatus();
|
$this->getBlockedStatus();
|
||||||
return $this->mBlockedby;
|
return $this->mBlockedby;
|
||||||
}
|
}
|
||||||
|
|
@ -1992,8 +1995,11 @@ class User implements Authority, UserIdentity, UserEmailContact {
|
||||||
/**
|
/**
|
||||||
* If user is blocked, return the ID for the block
|
* If user is blocked, return the ID for the block
|
||||||
* @return int|false
|
* @return int|false
|
||||||
|
* @deprecated since 1.38
|
||||||
|
* Hard deprecated since 1.38.
|
||||||
*/
|
*/
|
||||||
public function getBlockId() {
|
public function getBlockId() {
|
||||||
|
wfDeprecated( __METHOD__, '1.38' );
|
||||||
$this->getBlockedStatus();
|
$this->getBlockedStatus();
|
||||||
return ( $this->mBlock ? $this->mBlock->getId() : false );
|
return ( $this->mBlock ? $this->mBlock->getId() : false );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1296,6 +1296,8 @@ class UserTest extends MediaWikiIntegrationTestCase {
|
||||||
* @covers User::isBlockedFrom
|
* @covers User::isBlockedFrom
|
||||||
*/
|
*/
|
||||||
public function testBlockInstanceCache() {
|
public function testBlockInstanceCache() {
|
||||||
|
$this->hideDeprecated( 'User::blockedBy' );
|
||||||
|
$this->hideDeprecated( 'User::getBlockId' );
|
||||||
// First, check the user isn't blocked
|
// First, check the user isn't blocked
|
||||||
$user = $this->getMutableTestUser()->getUser();
|
$user = $this->getMutableTestUser()->getUser();
|
||||||
$ut = Title::makeTitle( NS_USER_TALK, $user->getName() );
|
$ut = Title::makeTitle( NS_USER_TALK, $user->getName() );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue