Merge "Make protected Revision methods private"

This commit is contained in:
jenkins-bot 2020-04-07 02:45:51 +00:00 committed by Gerrit Code Review
commit 5eaa701334
2 changed files with 12 additions and 5 deletions

View file

@ -725,6 +725,13 @@ 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
* The Revision method had a few methods that were previously protected and
have been made private. They were:
- ::getRevisionStore
- ::getRevisionLookup
- ::getRevisionFactory
- ::getBlobStore
The $mRecord variable was also changed from protected to private.
* The RevisionInsertComplete hook, soft deprecated in 1.31, now emits
deprecation warnings.
* RecentChange::markPatrolled was deprecated. Use ::doMarkPatrolled instead.

View file

@ -40,7 +40,7 @@ use Wikimedia\Rdbms\IDatabase;
class Revision implements IDBAccessObject {
/** @var RevisionRecord */
protected $mRecord;
private $mRecord;
// Revision deletion constants
public const DELETED_TEXT = RevisionRecord::DELETED_TEXT;
@ -61,7 +61,7 @@ class Revision implements IDBAccessObject {
* @param string|false $wiki
* @return RevisionStore
*/
protected static function getRevisionStore( $wiki = false ) {
private static function getRevisionStore( $wiki = false ) {
if ( $wiki ) {
return MediaWikiServices::getInstance()->getRevisionStoreFactory()
->getRevisionStore( $wiki );
@ -73,14 +73,14 @@ class Revision implements IDBAccessObject {
/**
* @return RevisionLookup
*/
protected static function getRevisionLookup() {
private static function getRevisionLookup() {
return MediaWikiServices::getInstance()->getRevisionLookup();
}
/**
* @return RevisionFactory
*/
protected static function getRevisionFactory() {
private static function getRevisionFactory() {
return MediaWikiServices::getInstance()->getRevisionFactory();
}
@ -89,7 +89,7 @@ class Revision implements IDBAccessObject {
*
* @return SqlBlobStore
*/
protected static function getBlobStore( $wiki = false ) {
private static function getBlobStore( $wiki = false ) {
$store = MediaWikiServices::getInstance()
->getBlobStoreFactory()
->newSqlBlobStore( $wiki );