From: Aaron Schulz Date: Thu, 11 Oct 2018 21:51:36 +0000 (-0700) Subject: Make merged MergeableUpdate items always go to the end of the queue X-Git-Tag: 1.34.0-rc.0~3795^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=9fb67b9a41da8714743789fa0365a6052cc86b97;p=lhc%2Fweb%2Fwiklou.git Make merged MergeableUpdate items always go to the end of the queue Change-Id: I2e8aa28f7426470d9b8b9e11b902deea793069b3 --- diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index e6a0e81779..47c9f6f2f3 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -146,6 +146,10 @@ class DeferredUpdates { /** @var MergeableUpdate $existingUpdate */ $existingUpdate = $queue[$class]; $existingUpdate->merge( $update ); + // Move the update to the end to handle things like mergeable purge + // updates that might depend on the prior updates in the queue running + unset( $queue[$class] ); + $queue[$class] = $existingUpdate; } else { $queue[$class] = $update; }