From: Aaron Schulz Date: Tue, 9 Apr 2019 07:19:34 +0000 (-0700) Subject: Switch more DatabaseUpdater type hints to using IMaintainableDatabase X-Git-Tag: 1.34.0-rc.0~2081^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=cea047669809552817afded21bffae5a74d76b10;p=lhc%2Fweb%2Fwiklou.git Switch more DatabaseUpdater type hints to using IMaintainableDatabase Change-Id: I59b49d00b94c62342e0bf13e127773bbc83f6453 --- diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 5add0a837e..54ffa5ad93 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -20,7 +20,6 @@ * @file * @ingroup Deployment */ -use Wikimedia\Rdbms\Database; use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\IMaintainableDatabase; use MediaWiki\MediaWikiServices; @@ -60,7 +59,7 @@ abstract class DatabaseUpdater { /** * Handle to the database subclass * - * @var Database + * @var IMaintainableDatabase */ protected $db; @@ -111,11 +110,15 @@ abstract class DatabaseUpdater { protected $holdContentHandlerUseDB = true; /** - * @param Database &$db To perform updates on + * @param IMaintainableDatabase &$db To perform updates on * @param bool $shared Whether to perform updates on shared tables * @param Maintenance|null $maintenance Maintenance object which created us */ - protected function __construct( Database &$db, $shared, Maintenance $maintenance = null ) { + protected function __construct( + IMaintainableDatabase &$db, + $shared, + Maintenance $maintenance = null + ) { $this->db = $db; $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files $this->shared = $shared; @@ -203,7 +206,7 @@ abstract class DatabaseUpdater { /** * Get a database connection to run updates * - * @return Database + * @return IMaintainableDatabase */ public function getDB() { return $this->db;