diff --git a/RELEASE-NOTES-1.38 b/RELEASE-NOTES-1.38 index a2cb173ebf4..e37ca624de5 100644 --- a/RELEASE-NOTES-1.38 +++ b/RELEASE-NOTES-1.38 @@ -282,6 +282,10 @@ because of Phabricator reports. - ::fieldName() soft-deprecated since 1.37 - ::onTransactionIdle() soft-deprecated since 1.32 - ::getMasterPos() since 1.37 +* DatabaseMysqlBase::fieldType() and DatabasePostgres::fieldType(), deprecated + since 1.37, have been removed. +* ResultWrapper::getInternalResult(), soft-deprecated since 1.37 and + ResultWrapper::unwrap(), deprecated since 1.37, have been removed. * Language::AS_AUTONYMS, deprecated since 1.34, has been removed. You can use the LanguageNameUtils::AUTONYMS constant instead. * Several Language class variables deprecated in 1.35 have been removed; they diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 07f28e590ca..c99a5b80ea4 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -23,7 +23,6 @@ namespace Wikimedia\Rdbms; use InvalidArgumentException; -use mysqli_result; use RuntimeException; use stdClass; use Wikimedia\AtEase\AtEase; @@ -231,33 +230,6 @@ abstract class DatabaseMysqlBase extends Database { */ abstract protected function mysqlConnect( $server, $user, $password, $db ); - /** - * mysql_field_type() wrapper - * - * Not part of the interface and apparently not called by anything. - * - * @deprecated since 1.37 - * - * @param MysqliResultWrapper $res - * @param int $n - * @return string - */ - public function fieldType( $res, $n ) { - wfDeprecated( __METHOD__, '1.37' ); - return $this->mysqlFieldType( $res->getInternalResult(), $n ); - } - - /** - * Get the type of the specified field in a result - * - * @deprecated since 1.37 - * - * @param mysqli_result $res - * @param int $n - * @return string - */ - abstract protected function mysqlFieldType( $res, $n ); - /** * @return string */ diff --git a/includes/libs/rdbms/database/DatabaseMysqli.php b/includes/libs/rdbms/database/DatabaseMysqli.php index ad36c4eb2c8..4de1284aa4f 100644 --- a/includes/libs/rdbms/database/DatabaseMysqli.php +++ b/includes/libs/rdbms/database/DatabaseMysqli.php @@ -165,17 +165,6 @@ class DatabaseMysqli extends DatabaseMysqlBase { return $conn->affected_rows; } - /** - * @param mysqli_result $res - * @param int $n - * @return string - */ - protected function mysqlFieldType( $res, $n ) { - $field = $res->fetch_field_direct( $n ); - - return $field->type; - } - /** * @param mysqli|null $conn Optional connection object * @return string diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index 7262512e39b..41f5834ce19 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -1137,20 +1137,6 @@ SQL; return PostgresField::fromText( $this, $table, $field ); } - /** - * pg_field_type() wrapper - * - * @deprecated since 1.37 - * - * @param PostgresResultWrapper $res ResultWrapper or PostgreSQL query result resource - * @param int $index Field number, starting from 0 - * @return string - */ - public function fieldType( $res, $index ) { - wfDeprecated( __METHOD__, '1.37' ); - return pg_field_type( $res->getInternalResult(), $index ); - } - public function encodeBlob( $b ) { return new PostgresBlob( pg_escape_bytea( $b ) ); } diff --git a/includes/libs/rdbms/database/resultwrapper/MysqliResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/MysqliResultWrapper.php index 8573a4bf8b5..39f39887991 100644 --- a/includes/libs/rdbms/database/resultwrapper/MysqliResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/MysqliResultWrapper.php @@ -65,17 +65,6 @@ class MysqliResultWrapper extends ResultWrapper { $this->result->data_seek( $pos ); } - /** - * Get the underlying result object or array - * - * @since 1.37 - * @deprecated since 1.37 Only exists to support deprecated methods - * @return mysqli_result - */ - public function getInternalResult() { - return $this->result; - } - protected function doFree() { $this->result = null; } diff --git a/includes/libs/rdbms/database/resultwrapper/PostgresResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/PostgresResultWrapper.php index 85579126f52..d19d84fbac9 100644 --- a/includes/libs/rdbms/database/resultwrapper/PostgresResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/PostgresResultWrapper.php @@ -24,17 +24,6 @@ class PostgresResultWrapper extends ResultWrapper { $this->result = $result; } - /** - * Get the underlying result object or array - * - * @since 1.37 - * @deprecated since 1.37 Only exists to support deprecated methods - * @return resource - */ - public function getInternalResult() { - return $this->result; - } - protected function doNumRows() { return pg_num_rows( $this->result ); } diff --git a/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php index 0004dac15ab..2f68f93eeec 100644 --- a/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php @@ -44,33 +44,6 @@ abstract class ResultWrapper implements IResultWrapper { */ private $fieldNames; - /** - * Get the underlying RDBMS driver-specific result resource - * - * The result resource field should not be accessed from non-Database related classes. - * It is database class specific and is stored here to associate iterators with queries. - * - * @since 1.34 - * @deprecated since 1.37 - * - * @param self|mixed $res - * @return mixed - */ - public static function unwrap( $res ) { - wfDeprecated( __METHOD__, '1.37' ); - if ( $res instanceof MysqliResultWrapper ) { - return $res->getInternalResult(); - } elseif ( $res instanceof SqliteResultWrapper ) { - return $res->getInternalResult(); - } elseif ( $res instanceof PostgresResultWrapper ) { - return $res->getInternalResult(); - } elseif ( $res instanceof IResultWrapper ) { - throw new \InvalidArgumentException( __METHOD__ . ': $res does not support unwrap()' ); - } else { - return $res; - } - } - /** * Get the number of rows in the result set * diff --git a/includes/libs/rdbms/database/resultwrapper/SqliteResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/SqliteResultWrapper.php index 81647542af0..957e9d46db4 100644 --- a/includes/libs/rdbms/database/resultwrapper/SqliteResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/SqliteResultWrapper.php @@ -24,17 +24,6 @@ class SqliteResultWrapper extends ResultWrapper { $this->rows = $result->fetchAll( PDO::FETCH_OBJ ); } - /** - * Get the underlying result object or array - * - * @since 1.37 - * @deprecated since 1.37 Only exists to support deprecated methods - * @return PDOStatement - */ - public function getInternalResult() { - return $this->result; - } - protected function doNumRows() { return count( $this->rows ); }