Gergő Tisza has uploaded a new change for review.
https://gerrit.wikimedia.org/r/314649
Change subject: Follow up core rename of DatabaseBase to Database
......................................................................
Follow up core rename of DatabaseBase to Database
PHPStorm and class_alias do not get along.
Change-Id: If936c29c4a47520b7d954da053b6d52c480d1ff0
---
M AntiSpoof/CentralAuthSpoofUser.php
M AntiSpoof/batchCAAntiSpoof.php
M includes/CentralAuthUser.php
M includes/CentralAuthUtils.php
M includes/GlobalRename/GlobalRenameRequest.php
M includes/GlobalRename/GlobalRenameUserDatabaseUpdates.php
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
M includes/UsersToRename/UsersToRenameDatabaseUpdates.php
M includes/api/ApiQueryGlobalAllUsers.php
M maintenance/forceRenameUsers.php
M tests/phpunit/CentralAuthTestUser.php
12 files changed, 24 insertions(+), 24 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/49/314649/1
diff --git a/AntiSpoof/CentralAuthSpoofUser.php
b/AntiSpoof/CentralAuthSpoofUser.php
index 0eba775..f19b88a 100644
--- a/AntiSpoof/CentralAuthSpoofUser.php
+++ b/AntiSpoof/CentralAuthSpoofUser.php
@@ -2,14 +2,14 @@
class CentralAuthSpoofUser extends SpoofUser {
/**
- * @return DatabaseBase
+ * @return Database
*/
protected function getDBSlave() {
return CentralAuthUtils::getCentralSlaveDB();
}
/**
- * @return DatabaseBase
+ * @return Database
*/
protected function getDBMaster() {
return CentralAuthUtils::getCentralDB();
diff --git a/AntiSpoof/batchCAAntiSpoof.php b/AntiSpoof/batchCAAntiSpoof.php
index e0d857e..4daae86 100644
--- a/AntiSpoof/batchCAAntiSpoof.php
+++ b/AntiSpoof/batchCAAntiSpoof.php
@@ -17,7 +17,7 @@
}
/**
- * @return DatabaseBase
+ * @return Database
*/
protected function getDB() {
return CentralAuthUtils::getCentralDB();
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 52b0426..3d0d179 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -204,7 +204,7 @@
/**
* @param $wikiID
- * @return DatabaseBase
+ * @return Database
*/
public static function getLocalDB( $wikiID ) {
return wfGetLB( $wikiID )->getConnection( DB_MASTER, array(),
$wikiID );
@@ -220,7 +220,7 @@
}
/**
- * @return DatabaseBase Master or slave based on shouldUseMasterDB()
+ * @return Database Master or slave based on shouldUseMasterDB()
* @throws CentralAuthReadOnlyError
*/
protected function getSafeReadDB() {
diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php
index 7ca4b49..04d905f 100644
--- a/includes/CentralAuthUtils.php
+++ b/includes/CentralAuthUtils.php
@@ -39,7 +39,7 @@
/**
* Gets a master (read/write) database connection to the CentralAuth
database
*
- * @return DatabaseBase
+ * @return Database
* @throws CentralAuthReadOnlyError
*/
public static function getCentralDB() {
@@ -56,7 +56,7 @@
/**
* Gets a slave (readonly) database connection to the CentralAuth
database
*
- * @return DatabaseBase
+ * @return Database
*/
public static function getCentralSlaveDB() {
global $wgCentralAuthDatabase;
diff --git a/includes/GlobalRename/GlobalRenameRequest.php
b/includes/GlobalRename/GlobalRenameRequest.php
index 155dea4..d8d9317 100644
--- a/includes/GlobalRename/GlobalRenameRequest.php
+++ b/includes/GlobalRename/GlobalRenameRequest.php
@@ -366,10 +366,10 @@
}
/**
- * Get a DatabaseBase object for the CentralAuth db
+ * Get a Database object for the CentralAuth db
*
* @param int $type DB_REPLICA or DB_MASTER
- * @return DatabaseBase
+ * @return Database
*/
protected static function getDB( $type ) {
if ( $type === DB_MASTER ) {
diff --git a/includes/GlobalRename/GlobalRenameUserDatabaseUpdates.php
b/includes/GlobalRename/GlobalRenameUserDatabaseUpdates.php
index 7a21912..a4e7441 100644
--- a/includes/GlobalRename/GlobalRenameUserDatabaseUpdates.php
+++ b/includes/GlobalRename/GlobalRenameUserDatabaseUpdates.php
@@ -9,7 +9,7 @@
class GlobalRenameUserDatabaseUpdates {
/**
- * @return DatabaseBase
+ * @return Database
*/
protected function getDB() {
return CentralAuthUtils::getCentralDB();
diff --git a/includes/GlobalRename/GlobalRenameUserStatus.php
b/includes/GlobalRename/GlobalRenameUserStatus.php
index 13d953a..73733b9 100644
--- a/includes/GlobalRename/GlobalRenameUserStatus.php
+++ b/includes/GlobalRename/GlobalRenameUserStatus.php
@@ -26,11 +26,11 @@
}
/**
- * Get a DatabaseBase object for the CentralAuth db
+ * Get a Database object for the CentralAuth db
*
* @param int $type DB_REPLICA or DB_MASTER
*
- * @return DatabaseBase
+ * @return Database
*/
protected function getDB( $type = DB_REPLICA ) {
if ( $type === DB_MASTER ) {
@@ -43,11 +43,11 @@
/**
* Get the where clause to query rows by either old or new name
*
- * @param DatabaseBase $db
+ * @param Database $db
*
* @return string
*/
- private function getNameWhereClause( DatabaseBase $db ) {
+ private function getNameWhereClause( Database $db ) {
return $db->makeList(
array( 'ru_oldname' => $this->name, 'ru_newname' =>
$this->name ),
LIST_OR
diff --git a/includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
b/includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
index c592233..11f0622 100644
--- a/includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
+++ b/includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
@@ -9,7 +9,7 @@
class GlobalUserMergeDatabaseUpdates {
/**
- * @return DatabaseBase
+ * @return Database
*/
protected function getDB() {
return CentralAuthUtils::getCentralDB();
diff --git a/includes/UsersToRename/UsersToRenameDatabaseUpdates.php
b/includes/UsersToRename/UsersToRenameDatabaseUpdates.php
index 69d58fe..ff8aeb4 100644
--- a/includes/UsersToRename/UsersToRenameDatabaseUpdates.php
+++ b/includes/UsersToRename/UsersToRenameDatabaseUpdates.php
@@ -16,11 +16,11 @@
const RENAMED = 8;
/**
- * @var DatabaseBase
+ * @var Database
*/
private $db;
- public function __construct( DatabaseBase $db ) {
+ public function __construct( Database $db ) {
$this->db = $db;
}
diff --git a/includes/api/ApiQueryGlobalAllUsers.php
b/includes/api/ApiQueryGlobalAllUsers.php
index e38c606..bbc7e6e 100644
--- a/includes/api/ApiQueryGlobalAllUsers.php
+++ b/includes/api/ApiQueryGlobalAllUsers.php
@@ -33,7 +33,7 @@
* Get the Query database connection (read-only)
*
* @see ApiQueryBase::getDB
- * @return DatabaseBase
+ * @return Database
*/
protected function getDB() {
static $db = null ;
diff --git a/maintenance/forceRenameUsers.php b/maintenance/forceRenameUsers.php
index d931d97..fc0cdbf 100644
--- a/maintenance/forceRenameUsers.php
+++ b/maintenance/forceRenameUsers.php
@@ -52,7 +52,7 @@
}
}
- protected function getCurrentRenameCount( DatabaseBase $dbw ) {
+ protected function getCurrentRenameCount( Database $dbw ) {
$row = $dbw->selectRow(
array( 'renameuser_status'),
array( 'COUNT(*) as count' ),
@@ -62,7 +62,7 @@
return (int)$row->count;
}
- protected function rename( $row, DatabaseBase $dbw ) {
+ protected function rename( $row, Database $dbw ) {
$wiki = $row->utr_wiki;
$name = $row->utr_name;
$newNamePrefix = User::getCanonicalName(
@@ -128,10 +128,10 @@
/**
* @param string $wiki
- * @param DatabaseBase $dbw
+ * @param Database $dbw
* @return stdClass[]
*/
- protected function findUsers( $wiki, DatabaseBase $dbw ) {
+ protected function findUsers( $wiki, Database $dbw ) {
$rowsToRename = array();
$updates = new UsersToRenameDatabaseUpdates( $dbw );
$rows = $updates->findUsers( $wiki,
UsersToRenameDatabaseUpdates::NOTIFIED, $this->mBatchSize );
diff --git a/tests/phpunit/CentralAuthTestUser.php
b/tests/phpunit/CentralAuthTestUser.php
index 422080c..7b4883a 100644
--- a/tests/phpunit/CentralAuthTestUser.php
+++ b/tests/phpunit/CentralAuthTestUser.php
@@ -138,9 +138,9 @@
/**
* Save the user into a centralauth database
- * @param DatabaseBase $db
+ * @param Database $db
*/
- public function save( DatabaseBase $db ) {
+ public function save( Database $db ) {
// Setup local wiki user
if ( $this->createLocal ) {
$user = User::newFromName( $this->username );
--
To view, visit https://gerrit.wikimedia.org/r/314649
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If936c29c4a47520b7d954da053b6d52c480d1ff0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits