rdbms: Hard-deprecate DBAccessObjectUtils::getDBOptions()

Bug: T354194
Change-Id: Ia9f030d3072ba728ddb7b0994ad0a49797a5dcae
This commit is contained in:
Amir Sarabadani 2024-05-02 07:44:49 +02:00
parent fef9c17a05
commit 95a8a88147
2 changed files with 4 additions and 0 deletions

View file

@ -143,6 +143,8 @@ because of Phabricator reports.
* OutputPage::showFatalError() is deprecated, use showErrorPage() instead.
* LoadBalancer::getConnectionRef(), deprecated since 1.39, now emits deprecation
warnings. Use ::getConnection() instead.
* DBAccessObjectUtils::getDBOptions() is deprecated, use
SelectQueryBuilder::recency() instead.
* IDatabase::lockForUpdate is deprecated, use
SelectQueryBuilder::acquireRowLocks instead.
* …

View file

@ -42,12 +42,14 @@ class DBAccessObjectUtils implements IDBAccessObject {
/**
* Get an appropriate DB index and options
*
* @deprecated since 1.43
* @param int $bitfield Bitfield of IDBAccessObject::READ_* constants
* @return array List of DB indexes and options in this order:
* - DB_PRIMARY or DB_REPLICA constant for the initial query
* - SELECT options array for the initial query
*/
public static function getDBOptions( $bitfield ) {
wfDeprecated( __METHOD__, '1.43' );
if ( self::hasFlags( $bitfield, IDBAccessObject::READ_LATEST_IMMUTABLE ) ) {
$index = DB_REPLICA; // override READ_LATEST if set
} elseif ( self::hasFlags( $bitfield, IDBAccessObject::READ_LATEST ) ) {