From 29b6189cb56160781f37b840989968e0331acaed Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 20 Apr 2020 15:34:41 -0700 Subject: [PATCH] dev/core#1460 - Apply different dispatch policies during main and finish phases This is the culmination of the preceding commits: when running upgrades, we don't just apply one brittle whitelist throughtout the process. Instead: - Apply a very restrictive dispatch policy while executing incremental DB updates, preventing interference from unexpected callpaths. - Apply a very permissive dispatch policy while executing the final cleanup/reset, allowing more data-structures to rehydrate correctly. --- CRM/Upgrade/DispatchPolicy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Upgrade/DispatchPolicy.php b/CRM/Upgrade/DispatchPolicy.php index 9403bd253c..de0fa72511 100644 --- a/CRM/Upgrade/DispatchPolicy.php +++ b/CRM/Upgrade/DispatchPolicy.php @@ -89,8 +89,8 @@ class CRM_Upgrade_DispatchPolicy { '/./' => 'run', ]; - return $policies['upgrade.old']; - // return $policies[$phase]; + // return $policies['upgrade.old']; + return $policies[$phase]; } } -- 2.25.1