aboutsummaryrefslogtreecommitdiffstats
path: root/includes/deferred
diff options
context:
space:
mode:
Diffstat (limited to 'includes/deferred')
-rw-r--r--includes/deferred/CdnCacheUpdate.php2
-rw-r--r--includes/deferred/DeferredUpdates.php6
-rw-r--r--includes/deferred/LinksDeletionUpdate.php2
-rw-r--r--includes/deferred/SiteStatsUpdate.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/includes/deferred/CdnCacheUpdate.php b/includes/deferred/CdnCacheUpdate.php
index c88db2bb2cd8..9385c7ff4f1d 100644
--- a/includes/deferred/CdnCacheUpdate.php
+++ b/includes/deferred/CdnCacheUpdate.php
@@ -127,7 +127,7 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
$relayerGroup->getRelayer( 'cdn-url-purges' )->notifyMulti(
'cdn-url-purges',
array_map(
- function ( $url ) use ( $ts ) {
+ static function ( $url ) use ( $ts ) {
return [
'url' => $url,
'timestamp' => $ts,
diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php
index ad9bcbdd96b6..63a69563735b 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -300,7 +300,7 @@ class DeferredUpdates {
self::getScopeStack()->current()->consumeMatchingUpdates(
self::ALL,
EnqueueableDataUpdate::class,
- function ( EnqueueableDataUpdate $update ) {
+ static function ( EnqueueableDataUpdate $update ) {
$spec = $update->getAsJobSpecification();
JobQueueGroup::singleton( $spec['domain'] )->push( $spec['job'] );
}
@@ -525,8 +525,8 @@ class DeferredUpdates {
}
$connsBusy = false;
- $lbFactory->forEachLB( function ( LoadBalancer $lb ) use ( &$connsBusy ) {
- $lb->forEachOpenMasterConnection( function ( IDatabase $conn ) use ( &$connsBusy ) {
+ $lbFactory->forEachLB( static function ( LoadBalancer $lb ) use ( &$connsBusy ) {
+ $lb->forEachOpenMasterConnection( static function ( IDatabase $conn ) use ( &$connsBusy ) {
if ( $conn->writesOrCallbacksPending() || $conn->explicitTrxActive() ) {
$connsBusy = true;
}
diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php
index 6a2f79238b91..7091ba89e7d3 100644
--- a/includes/deferred/LinksDeletionUpdate.php
+++ b/includes/deferred/LinksDeletionUpdate.php
@@ -71,7 +71,7 @@ class LinksDeletionUpdate extends LinksUpdate implements EnqueueableDataUpdate {
// spurious row in the category table.
if ( $title->getNamespace() === NS_CATEGORY ) {
// T166757: do the update after the main job DB commit
- DeferredUpdates::addCallableUpdate( function () use ( $title ) {
+ DeferredUpdates::addCallableUpdate( static function () use ( $title ) {
$cat = Category::newFromName( $title->getDBkey() );
$cat->refreshCountsIfSmall();
} );
diff --git a/includes/deferred/SiteStatsUpdate.php b/includes/deferred/SiteStatsUpdate.php
index c85e7e644536..1525c7e4cc8c 100644
--- a/includes/deferred/SiteStatsUpdate.php
+++ b/includes/deferred/SiteStatsUpdate.php
@@ -100,7 +100,7 @@ class SiteStatsUpdate implements DeferrableUpdate, MergeableUpdate {
( new AutoCommitUpdate(
$services->getDBLoadBalancer()->getConnectionRef( DB_MASTER ),
__METHOD__,
- function ( IDatabase $dbw, $fname ) use ( $deltaByType ) {
+ static function ( IDatabase $dbw, $fname ) use ( $deltaByType ) {
$set = [];
foreach ( self::COUNTERS as $field => $type ) {
$delta = (int)$deltaByType[$type];