rdbms: remove various deprecated methods
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 27 Jun 2019 08:13:13 +0000 (01:13 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 26 Jul 2019 14:56:02 +0000 (15:56 +0100)
Change-Id: I5ae923065a08078225b7df080cb92edca799ebaf

RELEASE-NOTES-1.34
includes/db/DatabaseOracle.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseSqlite.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php

index 368d2a4..3e2c744 100644 (file)
@@ -316,6 +316,17 @@ because of Phabricator reports.
 * UploadBase:: and UploadFromChunks::stashFileGetKey() and stashSession(),
   deprecated in 1.28, have been removed. Instead, please use the getFileKey()
   method on the response from doStashFile().
+* LBFactory::setDomainPrefix() and LoadBalancer::setDomainPrefix(), deprecated
+  in 1.33, have been removed. Use setLocalDomainPrefix() instead.
+* IDatabase::implicitGroupby(), deprecated in 1.30, has been removed.
+* IDatabase::doneWrites(), deprecated in 1.31, has been removed.
+  Use IDatabase::lastDoneWrites() instead.
+* Database::reportConnectionError(), deprecated in 1.32, has been removed.
+* LoadBalancer::laggedSlaveUsed(), deprecated in 1.28, has been removed.
+  Use LoadBalancer::laggedReplicaUsed() instead.
+* Database::getProperty(), deprecated in 1.28, has been removed.
+* IDatabase::getWikiId(), deprecated in 1.30, has been removed.
+  Use IDatabase::getDomainID() instead.
 * …
 
 === Deprecations in 1.34 ===
index 501f01a..9221716 100644 (file)
@@ -80,10 +80,6 @@ class DatabaseOracle extends Database {
                return 'oracle';
        }
 
-       function implicitGroupby() {
-               return false;
-       }
-
        function implicitOrderby() {
                return false;
        }
index 2c9858a..f27d042 100644 (file)
@@ -140,10 +140,6 @@ class DBConnRef implements IDatabase {
                throw new DBUnexpectedError( $this, "Database injection is disallowed to enable reuse." );
        }
 
-       public function implicitGroupby() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
        public function implicitOrderby() {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
@@ -152,10 +148,6 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
-       public function doneWrites() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
        public function lastDoneWrites() {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
@@ -218,13 +210,6 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
-       /**
-        * @codeCoverageIgnore
-        */
-       public function getWikiID() {
-               return $this->getDomainID();
-       }
-
        public function getType() {
                if ( $this->conn === null ) {
                        // Avoid triggering a database connection
index 60062fb..b1af7c3 100644 (file)
@@ -613,10 +613,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                return $this->lazyMasterHandle;
        }
 
-       public function implicitGroupby() {
-               return true;
-       }
-
        public function implicitOrderby() {
                return true;
        }
@@ -625,10 +621,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                return $this->lastQuery;
        }
 
-       public function doneWrites() {
-               return (bool)$this->lastWriteTime;
-       }
-
        public function lastDoneWrites() {
                return $this->lastWriteTime ?: false;
        }
@@ -779,23 +771,10 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                return (bool)( $this->flags & $flag );
        }
 
-       /**
-        * @param string $name Class field name
-        * @return mixed
-        * @deprecated Since 1.28
-        */
-       public function getProperty( $name ) {
-               return $this->$name;
-       }
-
        public function getDomainID() {
                return $this->currentDomain->getId();
        }
 
-       final public function getWikiID() {
-               return $this->getDomainID();
-       }
-
        /**
         * Get information about an index into an object
         * @param string $table Table name
index d06bcb9..54a15d8 100644 (file)
@@ -59,10 +59,6 @@ class DatabaseMssql extends Database {
        /** @var string[] */
        protected $ignoreErrors = [];
 
-       public function implicitGroupby() {
-               return false;
-       }
-
        public function implicitOrderby() {
                return false;
        }
index 840b428..4dff5de 100644 (file)
@@ -64,10 +64,6 @@ class DatabasePostgres extends Database {
                return 'postgres';
        }
 
-       public function implicitGroupby() {
-               return false;
-       }
-
        public function implicitOrderby() {
                return false;
        }
index 11dda2f..dc9c531 100644 (file)
@@ -123,15 +123,6 @@ class DatabaseSqlite extends Database {
                return 'sqlite';
        }
 
-       /**
-        * @todo Check if it should be true like parent class
-        *
-        * @return bool
-        */
-       public function implicitGroupby() {
-               return false;
-       }
-
        protected function open( $server, $user, $pass, $dbName, $schema, $tablePrefix ) {
                $this->close();
 
index ef7f1e2..11bc67b 100644 (file)
@@ -238,14 +238,6 @@ interface IDatabase {
         */
        public function setLazyMasterHandle( IDatabase $conn );
 
-       /**
-        * Returns true if this database does an implicit sort when doing GROUP BY
-        *
-        * @return bool
-        * @deprecated Since 1.30; only use grouped or aggregated fields in the SELECT
-        */
-       public function implicitGroupby();
-
        /**
         * Returns true if this database does an implicit order by when the column has an index
         * For example: SELECT page_title FROM page LIMIT 1
@@ -260,15 +252,6 @@ interface IDatabase {
         */
        public function lastQuery();
 
-       /**
-        * Returns true if the connection may have been used for write queries.
-        * Should return true if unsure.
-        *
-        * @return bool
-        * @deprecated Since 1.31; use lastDoneWrites()
-        */
-       public function doneWrites();
-
        /**
         * Returns the last time the connection may have been used for write queries.
         * Should return a timestamp if unsure.
@@ -390,14 +373,6 @@ interface IDatabase {
         */
        public function getDomainID();
 
-       /**
-        * Alias for getDomainID()
-        *
-        * @return string
-        * @deprecated 1.30
-        */
-       public function getWikiID();
-
        /**
         * Get the type of the DBMS, as it appears in $wgDBtype.
         *
index a85e1e5..4426654 100644 (file)
@@ -651,14 +651,6 @@ abstract class LBFactory implements ILBFactory {
                $this->indexAliases = $aliases;
        }
 
-       /**
-        * @param string $prefix
-        * @deprecated Since 1.33
-        */
-       public function setDomainPrefix( $prefix ) {
-               $this->setLocalDomainPrefix( $prefix );
-       }
-
        public function setLocalDomainPrefix( $prefix ) {
                $this->localDomain = new DatabaseDomain(
                        $this->localDomain->getDatabase(),
index 1ef1d09..14c17c1 100644 (file)
@@ -1922,15 +1922,6 @@ class LoadBalancer implements ILoadBalancer {
                return $this->laggedReplicaMode;
        }
 
-       /**
-        * @return bool
-        * @since 1.27
-        * @deprecated Since 1.28; use laggedReplicaUsed()
-        */
-       public function laggedSlaveUsed() {
-               return $this->laggedReplicaUsed();
-       }
-
        public function getReadOnlyReason( $domain = false, IDatabase $conn = null ) {
                if ( $this->readOnlyReason !== false ) {
                        return $this->readOnlyReason;
@@ -2203,14 +2194,6 @@ class LoadBalancer implements ILoadBalancer {
                $this->indexAliases = $aliases;
        }
 
-       /**
-        * @param string $prefix
-        * @deprecated Since 1.33
-        */
-       public function setDomainPrefix( $prefix ) {
-               $this->setLocalDomainPrefix( $prefix );
-       }
-
        public function setLocalDomainPrefix( $prefix ) {
                // Find connections to explicit foreign domains still marked as in-use...
                $domainsInUse = [];