Merge "Hard deprecate PageArchive::getPreviousRevision"
This commit is contained in:
commit
7a36d66d75
3 changed files with 5 additions and 1 deletions
|
|
@ -716,7 +716,7 @@ because of Phabricator reports.
|
|||
* ApiTestCase::doLogin, soft deprecated in 1.31, was hard deprecated.
|
||||
* WebRequest::getLimitOffset is hard deprecated. Instead, use
|
||||
::getLimitOffsetForUser and pass a User object.
|
||||
* PageArchive::getPreviousRevision is soft deprecated. Instead, use the new
|
||||
* PageArchive::getPreviousRevision is hard deprecated. Instead, use the new
|
||||
::getPreviousRevisionRecord method.
|
||||
* PageArchive::getArchivedRevision is hard deprecated. Instead, use the new
|
||||
::getArchivedRevisionRecord method.
|
||||
|
|
|
|||
|
|
@ -325,6 +325,8 @@ class PageArchive {
|
|||
* @return Revision|null Null when there is no previous revision
|
||||
*/
|
||||
public function getPreviousRevision( $timestamp ) {
|
||||
wfDeprecated( __METHOD__, '1.35' );
|
||||
|
||||
$revRecord = $this->getPreviousRevisionRecord( $timestamp );
|
||||
$rev = $revRecord ? new Revision( $revRecord ) : null;
|
||||
return $rev;
|
||||
|
|
|
|||
|
|
@ -343,6 +343,8 @@ class PageArchiveTest extends MediaWikiTestCase {
|
|||
* @covers PageArchive::getPreviousRevision
|
||||
*/
|
||||
public function testGetPreviousRevision() {
|
||||
$this->hideDeprecated( 'PageArchive::getPreviousRevision' );
|
||||
|
||||
$rev = $this->archivedPage->getPreviousRevision( $this->ipRev->getTimestamp() );
|
||||
$this->assertNotNull( $rev );
|
||||
$this->assertSame( $this->firstRev->getId(), $rev->getId() );
|
||||
|
|
|
|||
Loading…
Reference in a new issue