From 8287e2814da518486a12b97764dfe3364de0e650 Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Thu, 7 Jul 2022 13:11:30 +0200 Subject: rdbms: Flip ConnectionManager deprecations to match ILoadBalancer The difference between non-ref, ref, and lazy connections has been eliminated; all connections are lazy and reference counted now. Consequently, deprecate the ref and lazy methods: all callers should just use getReadConnection() and getWriteConnection() now. Bug: T312527 Change-Id: I72713a7a1127541fa2d0f45b75373100e3b400fc --- includes/libs/rdbms/connectionmanager/ConnectionManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes/libs') diff --git a/includes/libs/rdbms/connectionmanager/ConnectionManager.php b/includes/libs/rdbms/connectionmanager/ConnectionManager.php index 1d75fa904a32..3e073291f786 100644 --- a/includes/libs/rdbms/connectionmanager/ConnectionManager.php +++ b/includes/libs/rdbms/connectionmanager/ConnectionManager.php @@ -91,29 +91,25 @@ class ConnectionManager { } /** - * Returns a connection to the primary DB, for updating. The connection should later be released - * by calling releaseConnection(). + * Returns a connection to the primary DB, for updating. * * @since 1.29 * @since 1.37 Added optional $flags parameter * @param int $flags * @return IDatabase - * @deprecated since 1.38; Use getWriteConnectionRef() */ public function getWriteConnection( int $flags = 0 ) { return $this->getConnection( DB_PRIMARY, null, $flags ); } /** - * Returns a database connection for reading. The connection should later be released by - * calling releaseConnection(). + * Returns a database connection for reading. * * @since 1.29 * @since 1.37 Added optional $flags parameter * @param string[]|null $groups * @param int $flags * @return IDatabase - * @deprecated since 1.38; Use getReadConnectionRef() */ public function getReadConnection( ?array $groups = null, int $flags = 0 ) { $groups = $groups ?? $this->groups; @@ -135,6 +131,7 @@ class ConnectionManager { * @since 1.29 * * @return DBConnRef + * @deprecated since 1.39; Use getWriteConnection() */ public function getWriteConnectionRef() { return $this->getConnectionRef( DB_PRIMARY ); @@ -146,6 +143,7 @@ class ConnectionManager { * @since 1.29 * @param string[]|null $groups * @return DBConnRef + * @deprecated since 1.38; Use getReadConnection() */ public function getReadConnectionRef( array $groups = null ) { $groups = $groups ?? $this->groups; @@ -157,6 +155,7 @@ class ConnectionManager { * * @since 1.38 * @return DBConnRef + * @deprecated since 1.39; Use getWriteConnection() */ public function getLazyWriteConnectionRef(): DBConnRef { return $this->getConnectionRef( DB_PRIMARY ); @@ -168,6 +167,7 @@ class ConnectionManager { * @since 1.37 * @param string[]|null $groups * @return DBConnRef + * @deprecated since 1.39; Use getReadConnection() */ public function getLazyReadConnectionRef( array $groups = null ) { $groups = $groups ?? $this->groups; -- cgit v1.2.3