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:
parent
33a2f3553d
commit
232dc98d54
3 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue