Move IDatabase/IMaintainableDatabase to Rdbms namespace
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index 6a8a99f..8913c77 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Deployment
  */
+use Wikimedia\Rdbms\IDatabase;
 use MediaWiki\MediaWikiServices;
 
 require_once __DIR__ . '/../../maintenance/Maintenance.php';
@@ -59,6 +60,11 @@ abstract class DatabaseUpdater {
         */
        protected $db;
 
+       /**
+        * @var Maintenance
+        */
+       protected $maintenance;
+
        protected $shared = false;
 
        /**
@@ -387,7 +393,7 @@ abstract class DatabaseUpdater {
         * Writes the schema updates desired to a file for the DB Admin to run.
         * @param array $schemaUpdate
         */
-       private function writeSchemaUpdateFile( $schemaUpdate = [] ) {
+       private function writeSchemaUpdateFile( array $schemaUpdate = [] ) {
                $updates = $this->updatesSkipped;
                $this->updatesSkipped = [];
 
@@ -420,7 +426,7 @@ abstract class DatabaseUpdater {
         *
         * @param array $what What updates to perform
         */
-       public function doUpdates( $what = [ 'core', 'extensions', 'stats' ] ) {
+       public function doUpdates( array $what = [ 'core', 'extensions', 'stats' ] ) {
                $this->db->setSchemaVars( $this->getSchemaVars() );
 
                $what = array_flip( $what );
@@ -485,7 +491,7 @@ abstract class DatabaseUpdater {
        public function updateRowExists( $key ) {
                $row = $this->db->selectRow(
                        'updatelog',
-                       # Bug 65813
+                       # T67813
                        '1 AS X',
                        [ 'ul_key' => $key ],
                        __METHOD__