Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316604

Change subject: Deprecate Database::getProperty()
......................................................................

Deprecate Database::getProperty()

Change-Id: If0399dded731b139ffbaab405eceeeafcdf9aed9
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/IDatabase.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
3 files changed, 6 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/316604/1

diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index a3544f1..38f51d3 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -609,6 +609,11 @@
                return !!( $this->mFlags & $flag );
        }
 
+       /**
+        * @param string $name Class field name
+        * @return mixed
+        * @deprecated Since 1.28
+        */
        public function getProperty( $name ) {
                return $this->$name;
        }
diff --git a/includes/libs/rdbms/database/IDatabase.php 
b/includes/libs/rdbms/database/IDatabase.php
index 952a2d6..c80fdec 100644
--- a/includes/libs/rdbms/database/IDatabase.php
+++ b/includes/libs/rdbms/database/IDatabase.php
@@ -323,14 +323,6 @@
        public function getFlag( $flag );
 
        /**
-        * General read-only accessor
-        *
-        * @param string $name
-        * @return string
-        */
-       public function getProperty( $name );
-
-       /**
         * @return string
         */
        public function getDomainID();
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index b1c212e..894c0dc 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -887,7 +887,7 @@
                        // 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

-- 
To view, visit https://gerrit.wikimedia.org/r/316604
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0399dded731b139ffbaab405eceeeafcdf9aed9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to