Merge "Hard-deprecate MWTimestamp::getHumanTimestamp"

This commit is contained in:
jenkins-bot 2022-06-20 02:39:18 +00:00 committed by Gerrit Code Review
commit e276a25427
3 changed files with 4 additions and 0 deletions

View file

@ -359,6 +359,8 @@ because of Phabricator reports.
- ::setUserObj() → ::setUsername()
- ::setUserIP() → ::setUsername()
* ObjectCache::addBusyCallback() is deprecated and non-functional.
* MWTimestamp::getHumanTimestamp(), deprecated in 1.26, now emits deprecation
warnings.
* …
=== Other changes in 1.39 ===

View file

@ -68,6 +68,7 @@ class MWTimestamp extends ConvertibleTimestamp {
public function getHumanTimestamp(
MWTimestamp $relativeTo = null, UserIdentity $user = null, Language $lang = null
) {
wfDeprecated( __METHOD__, '1.26' );
if ( $lang === null ) {
$lang = RequestContext::getMain()->getLanguage();
}

View file

@ -38,6 +38,7 @@ class MWTimestampTest extends MediaWikiLangTestCase {
$expectedOutput, // The expected output
$desc // Description
) {
$this->hideDeprecated( 'MWTimestamp::getHumanTimestamp' );
$this->setMockUserOptions( [
'timecorrection' => $timeCorrection,
'date' => $dateFormat