Remove hard-deprecate param fallbacks in RevisionStore

Change-Id: I5808a9a5d25ed2ea85ee45ed631522d0ec0770a1
This commit is contained in:
Petr Pchelko 2021-01-20 22:24:18 -06:00
parent a5823e607c
commit 16fab630f7
2 changed files with 4 additions and 14 deletions

View file

@ -361,6 +361,8 @@ because of Phabricator reports.
clone, that will no longer occur and tests may fail.
* The UserWrapper class, which was only loaded for tests and had no uses found
in public MediaWiki-related git, was removed.
* Passing Title as a second parameter to RevisionStore::getPreviousRevision and
getNextRevision, hard deprecated since 1.31, was prohibited.
* …
=== Deprecations in 1.36 ===

View file

@ -2725,13 +2725,7 @@ class RevisionStore
*
* @return RevisionRecord|null
*/
public function getPreviousRevision( RevisionRecord $rev, $flags = 0 ) {
if ( $flags instanceof Title ) {
// Old calling convention, we don't use Title here anymore
wfDeprecated( __METHOD__ . ' with Title', '1.34' );
$flags = 0;
}
public function getPreviousRevision( RevisionRecord $rev, $flags = self::READ_NORMAL ) {
return $this->getRelativeRevision( $rev, $flags, 'prev' );
}
@ -2748,13 +2742,7 @@ class RevisionStore
* IDBAccessObject::READ_LATEST: Select the data from the master
* @return RevisionRecord|null
*/
public function getNextRevision( RevisionRecord $rev, $flags = 0 ) {
if ( $flags instanceof Title ) {
// Old calling convention, we don't use Title here anymore
wfDeprecated( __METHOD__ . ' with Title', '1.34' );
$flags = 0;
}
public function getNextRevision( RevisionRecord $rev, $flags = self::READ_NORMAL ) {
return $this->getRelativeRevision( $rev, $flags, 'next' );
}