aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs
diff options
context:
space:
mode:
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>2022-07-07 13:11:30 +0200
committerKrinkle <krinkle@fastmail.com>2022-07-15 05:11:04 +0000
commit8287e2814da518486a12b97764dfe3364de0e650 (patch)
tree855dd2dda3cdf092c9df125c259eb4acf376025b /includes/libs
parent52bf11384cc5d07ff8b8ffecdcb504dd6328ede0 (diff)
downloadmediawikicore-8287e2814da518486a12b97764dfe3364de0e650.tar.gz
mediawikicore-8287e2814da518486a12b97764dfe3364de0e650.zip
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
Diffstat (limited to 'includes/libs')
-rw-r--r--includes/libs/rdbms/connectionmanager/ConnectionManager.php12
1 files changed, 6 insertions, 6 deletions
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;