summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2021-12-21 23:55:45 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2021-12-21 23:55:45 +0000
commit7414fa5d07386da75c08284c1c1cf5cba1cdcdd5 (patch)
tree24464a4a06ae58ecdac55de2d5fcd6726adf2813
parent90be4ac358b9f3c447013c4aeeefe9596637cb1f (diff)
parentbe11c21d21c0375c301787843f0db5ca6c6d0d81 (diff)
Merge "rdbms: Remove IDatabase::fieldName() method"
-rw-r--r--RELEASE-NOTES-1.381
-rw-r--r--includes/libs/rdbms/database/DBConnRef.php4
-rw-r--r--includes/libs/rdbms/database/Database.php4
-rw-r--r--includes/libs/rdbms/database/IDatabase.php12
-rw-r--r--tests/phpunit/includes/db/DatabaseTestHelper.php4
-rw-r--r--tests/phpunit/unit/includes/libs/rdbms/database/DatabaseTest.php1
6 files changed, 1 insertions, 25 deletions
diff --git a/RELEASE-NOTES-1.38 b/RELEASE-NOTES-1.38
index e54b566dbe43..1c0bd0cc65d1 100644
--- a/RELEASE-NOTES-1.38
+++ b/RELEASE-NOTES-1.38
@@ -277,6 +277,7 @@ because of Phabricator reports.
- ::masterPosWait() since 1.37
- ::dataSeek() soft-deprecated since 1.37
- ::numFields() soft-deprecated since 1.37
+ - ::fieldName() soft-deprecated since 1.37
- ::onTransactionIdle() soft-deprecated since 1.32
- ::getMasterPos() since 1.37
* Language::AS_AUTONYMS, deprecated since 1.34, has been removed. You can use
diff --git a/includes/libs/rdbms/database/DBConnRef.php b/includes/libs/rdbms/database/DBConnRef.php
index 105ed953b7a7..6a0bb0631d17 100644
--- a/includes/libs/rdbms/database/DBConnRef.php
+++ b/includes/libs/rdbms/database/DBConnRef.php
@@ -231,10 +231,6 @@ class DBConnRef implements IDatabase {
return $this->__call( __FUNCTION__, func_get_args() );
}
- public function fieldName( $res, $n ) {
- return $this->__call( __FUNCTION__, func_get_args() );
- }
-
public function insertId() {
return $this->__call( __FUNCTION__, func_get_args() );
}
diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php
index 2e5a875fecff..4927519b085a 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -872,10 +872,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
}
}
- public function fieldName( IResultWrapper $res, $n ) {
- return $res->getFieldNames()[$n];
- }
-
public function freeResult( IResultWrapper $res ) {
$res->free();
}
diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php
index 3ec43598064c..5fec4f25825b 100644
--- a/includes/libs/rdbms/database/IDatabase.php
+++ b/includes/libs/rdbms/database/IDatabase.php
@@ -426,18 +426,6 @@ interface IDatabase {
public function numRows( $res );
/**
- * Get a field name in a result object
- * @see https://www.php.net/mysql_field_name
- *
- * @deprecated since 1.37
- *
- * @param IResultWrapper $res A SQL result
- * @param int $n
- * @return string
- */
- public function fieldName( IResultWrapper $res, $n );
-
- /**
* Free a result object returned by query() or select()
*
* It's usually not necessary to call this, just use unset() or let the variable
diff --git a/tests/phpunit/includes/db/DatabaseTestHelper.php b/tests/phpunit/includes/db/DatabaseTestHelper.php
index 010c58bfe1a2..2d883012c624 100644
--- a/tests/phpunit/includes/db/DatabaseTestHelper.php
+++ b/tests/phpunit/includes/db/DatabaseTestHelper.php
@@ -195,10 +195,6 @@ class DatabaseTestHelper extends Database {
return -1;
}
- public function fieldName( $res, $n ) {
- return 'test';
- }
-
public function insertId() {
return -1;
}
diff --git a/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseTest.php b/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseTest.php
index 1d47319c81d5..789932b2af6c 100644
--- a/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseTest.php
+++ b/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseTest.php
@@ -448,7 +448,6 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
'fetchObject',
'fetchRow',
'fieldInfo',
- 'fieldName',
'getSoftwareLink',
'getServerVersion',
'getType',