Hard deprecate Revision::getNext

Unused in deployed code, see codesearch:
https://codesearch.wmflabs.org/deployed/?q=-%3EgetNext%5C(%5C)&i=nope&files=%5C.php%24&repos=

Bug: T246284
Change-Id: Ic216093500418526029dde3a8ae4314b35361b13
This commit is contained in:
DannyS712 2020-04-27 04:10:02 +00:00
parent 33a2f3553d
commit 232dc98d54
3 changed files with 5 additions and 0 deletions

View file

@ -788,6 +788,7 @@ because of Phabricator reports.
- ::getRecentChange - use RevisionStore::getRecentChange instead
- ::getTextId - use SlotRecord::getContentAddress for retrieving an actual
content address, or RevisionRecord::hasSameContent to compare content
- ::getNext - use RevisionLookup::getNextRevision instead
* The Revision method had a few methods that were previously protected and
have been made private. They were:
- ::getRevisionStore

View file

@ -861,9 +861,12 @@ class Revision implements IDBAccessObject {
/**
* Get next revision for this title
*
* @deprecated since 1.31 (soft), 1.35 (hard), use RevisionLookup::getNextRevision instead
*
* @return Revision|null
*/
public function getNext() {
wfDeprecated( __METHOD__, '1.31' );
$rec = self::getRevisionLookup()->getNextRevision( $this->mRecord );
return $rec ? new Revision( $rec, self::READ_NORMAL, $this->getTitle() ) : null;
}

View file

@ -687,6 +687,7 @@ class RevisionDbTest extends MediaWikiIntegrationTestCase {
* @covers Revision::getNext
*/
public function testGetNext() {
$this->hideDeprecated( 'Revision::getNext' );
$this->hideDeprecated( 'WikiPage::getRevision' );
$rev1 = $this->testPage->getRevision();