Deprecate Database::getProperty()
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 18 Oct 2016 18:05:39 +0000 (11:05 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 18 Oct 2016 18:05:39 +0000 (11:05 -0700)
Change-Id: If0399dded731b139ffbaab405eceeeafcdf9aed9

includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php

index a3544f1..38f51d3 100644 (file)
@@ -609,6 +609,11 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                return !!( $this->mFlags & $flag );
        }
 
+       /**
+        * @param string $name Class field name
+        * @return mixed
+        * @deprecated Since 1.28
+        */
        public function getProperty( $name ) {
                return $this->$name;
        }
index 952a2d6..c80fdec 100644 (file)
@@ -322,14 +322,6 @@ interface IDatabase {
         */
        public function getFlag( $flag );
 
-       /**
-        * General read-only accessor
-        *
-        * @param string $name
-        * @return string
-        */
-       public function getProperty( $name );
-
        /**
         * @return string
         */
index b1c212e..894c0dc 100644 (file)
@@ -887,7 +887,7 @@ class LoadBalancer implements ILoadBalancer {
                        // If all servers were busy, mLastError will contain something sensible
                        throw new DBConnectionError( null, $this->mLastError );
                } else {
-                       $context['db_server'] = $conn->getProperty( 'mServer' );
+                       $context['db_server'] = $conn->getServer();
                        $this->connLogger->warning(
                                "Connection error: {last_error} ({db_server})",
                                $context