Component/Extensions - Remove unnecessary cache clearing and prevent recursion
authorColeman Watts <coleman@civicrm.org>
Thu, 27 Apr 2023 00:26:49 +0000 (20:26 -0400)
committerColeman Watts <colemanw@civicrm.org>
Fri, 12 May 2023 02:13:41 +0000 (22:13 -0400)
commitf84c861734c54bd4a2d54f61fb8f08f605be391d
tree7aa2d124cef7c4c2533373282855fa44d6de0357
parent8a7453b1fa78d6de93cd1788db541503b353b787
Component/Extensions - Remove unnecessary cache clearing and prevent recursion

Ensure the cached settings are updated _before_ post_change hooks are called for settings.

All the cache clears being performed by on_change hooks were redundant with what happens when
extensions are enabled/disabled so I removed it.

Also moved the extension install hook to use postInstall which should be more stable, and
added checks in onToggleComponents to prevent recursion.
CRM/Core/BAO/ConfigSetting.php
CRM/Core/Component.php
CRM/Extension/Upgrader/Component.php
Civi/Core/SettingsBag.php
api/v3/examples/Setting/GetFields.ex.php
settings/Core.setting.php