aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--RELEASE-NOTES-1.442
-rw-r--r--includes/libs/objectcache/BagOStuff.php11
-rw-r--r--includes/libs/objectcache/WANObjectCache.php14
3 files changed, 15 insertions, 12 deletions
diff --git a/RELEASE-NOTES-1.44 b/RELEASE-NOTES-1.44
index d733acf0d2da..8c3f7e05a30a 100644
--- a/RELEASE-NOTES-1.44
+++ b/RELEASE-NOTES-1.44
@@ -271,6 +271,8 @@ because of Phabricator reports.
been removed.
* The `MediaWiki\User\Registration\IUserRegistrationProvider` interface now
defines a required fetchRegistrationBatch() method.
+* BagOStuff::clearLastError() and WANObjectCache::clearLastError(), both
+ deprecated in 1.43, have been removed.
* The hook OutputPageMakeCategoryLinks, deprecated in 1.43, has been removed.
* ApiPageSet::getTitles(), ApiPageSet::getGoodTitles(),
ApiPageSet::getMissingTitles(), ApiPageSet::getGoodAndMissingTitles(),
diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php
index 5edb35bbdd9f..5e73704c6088 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -557,17 +557,6 @@ abstract class BagOStuff implements
}
/**
- * Clear the "last error" registry
- *
- * @since 1.23
- * @deprecated Since 1.38, hard deprecated in 1.43
- */
- public function clearLastError() {
- wfDeprecated( __METHOD__, '1.38' );
- $this->lastError = self::ERR_NONE;
- }
-
- /**
* Set the "last error" registry due to a problem encountered during an attempted operation
*
* @param int $error BagOStuff:ERR_* constant
diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php
index 925a2709158d..d2661d68bd7a 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -194,7 +194,7 @@ class WANObjectCache implements
protected $coalesceScheme;
/** @var TracerInterface */
- private $tracer = null;
+ private $tracer;
/** @var array<int,array> List of (key, UNIX timestamp) tuples for get() cache misses */
private $missLog;
@@ -461,6 +461,7 @@ class WANObjectCache implements
// Also, if no $info parameter is provided, then it doesn't matter how it changes here.
$legacyInfo = ( $info !== self::PASS_BY_REF );
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key, $checkKeys );
$now = $this->getCurrentTime();
@@ -521,6 +522,7 @@ class WANObjectCache implements
// Also, if no $info parameter is provided, then it doesn't matter how it changes here.
$legacyInfo = ( $info !== self::PASS_BY_REF );
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $keys, $checkKeys );
$curTTLs = [];
@@ -803,6 +805,7 @@ class WANObjectCache implements
* @return bool Success
*/
final public function set( $key, $value, $ttl = self::TTL_INDEFINITE, array $opts = [] ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
$keygroup = $this->determineKeyGroupForStats( $key );
@@ -1055,6 +1058,7 @@ class WANObjectCache implements
* @return bool True if the item was purged or not found, false on failure
*/
final public function delete( $key, $ttl = self::HOLDOFF_TTL ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
// Purge values must be stored under the value key so that WANObjectCache::set()
@@ -1116,7 +1120,9 @@ class WANObjectCache implements
* @return float UNIX timestamp
*/
final public function getCheckKeyTime( $key ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
+
return $this->getMultiCheckKeyTime( [ $key ] )[$key];
}
@@ -1182,6 +1188,7 @@ class WANObjectCache implements
* @since 1.31
*/
final public function getMultiCheckKeyTime( array $keys ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $keys );
$checkSisterKeysByKey = [];
@@ -1246,6 +1253,7 @@ class WANObjectCache implements
* @return bool True if the item was purged or not found, false on failure
*/
public function touchCheckKey( $key, $holdoff = self::HOLDOFF_TTL ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
$checkSisterKey = $this->makeSisterKey( $key, self::TYPE_TIMESTAMP );
@@ -1298,6 +1306,7 @@ class WANObjectCache implements
* @return bool True if the item was purged or not found, false on failure
*/
public function resetCheckKey( $key ) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
$checkSisterKey = $this->makeSisterKey( $key, self::TYPE_TIMESTAMP );
@@ -1618,7 +1627,9 @@ class WANObjectCache implements
final public function getWithSetCallback(
$key, $ttl, $callback, array $opts = [], array $cbParams = []
) {
+ /** @noinspection PhpUnusedLocalVariableInspection */
$span = $this->startOperationSpan( __FUNCTION__, $key );
+
$version = $opts['version'] ?? null;
$pcTTL = $opts['pcTTL'] ?? self::TTL_UNCACHEABLE;
$pCache = ( $pcTTL >= 0 )
@@ -1828,6 +1839,7 @@ class WANObjectCache implements
$preCallbackTime = $this->getCurrentTime();
++$this->callbackDepth;
// https://github.com/phan/phan/issues/4419
+ /** @noinspection PhpUnusedLocalVariableInspection */
$value = null;
try {
$value = $callback(