Hard-deprecate MWTimestamp::getHumanTimestamp

Originally deprecated in 1.26.

Depends-On: I9ae99887b11879ae0ef083acf93a791cf72eb2d0
Change-Id: Ifdfeb88f8998bd01a32df86952dd6e85451bf074
This commit is contained in:
Matěj Suchánek 2022-06-19 13:45:57 +02:00 committed by DannyS712
parent 5d47bd887f
commit 28b1cd9e19
3 changed files with 4 additions and 0 deletions

View file

@ -355,6 +355,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