'DBUnexpectedError' => __DIR__ . '/includes/libs/rdbms/exception/DBUnexpectedError.php',
'DataUpdate' => __DIR__ . '/includes/deferred/DataUpdate.php',
'Database' => __DIR__ . '/includes/libs/rdbms/database/Database.php',
- 'DatabaseBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseBase.php',
+ 'DatabaseBase' => __DIR__ . '/includes/libs/rdbms/database/Database.php',
'DatabaseDomain' => __DIR__ . '/includes/libs/rdbms/database/DatabaseDomain.php',
'DatabaseInstaller' => __DIR__ . '/includes/installer/DatabaseInstaller.php',
'DatabaseLag' => __DIR__ . '/maintenance/lag.php',
}
}
}
+
+class_alias( 'Database', 'DatabaseBase' );
+++ /dev/null
-<?php
-/**
- * @defgroup Database Database
- *
- * This file deals with database interface functions
- * and query specifics/optimisations.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Database abstraction object
- * @ingroup Database
- */
-abstract class DatabaseBase extends Database {
- // Backwards-compatibility alias for type-hints
-}
* @since 1.22
* @see Database
*/
-abstract class DatabaseMysqlBase extends DatabaseBase {
+abstract class DatabaseMysqlBase extends Database {
/** @var MysqlMasterPos */
protected $lastKnownReplicaPos;
/** @var string Method to detect replica DB lag */
/**
* @ingroup Database
*/
-class DatabasePostgres extends DatabaseBase {
+class DatabasePostgres extends Database {
/** @var int|bool */
protected $port;
/**
* @ingroup Database
*/
-class DatabaseSqlite extends DatabaseBase {
+class DatabaseSqlite extends Database {
/** @var bool Whether full text is enabled */
private static $fulltextEnabled = null;
*
* @param {string} $commandName Command name to include in comment
* @param {string} $filename of PHP file to put autoload information in.
+ * @return string
*/
protected function generatePHPAutoload( $commandName, $filename ) {
// No existing JSON file found; update/generate PHP file
foreach ( glob( $this->basepath . '/*.php' ) as $file ) {
$this->readFile( $file );
}
+
+ // Legacy aliases
+ $this->forceClassPath( 'DatabaseBase',
+ $this->basepath . '/includes/libs/rdbms/database/Database.php' );
}
}