Summary
When developing a plugin that listens to ClientConfig_ConfigChange, inside a multi-context-aware setup, there is no way of knowing which context just got changed/updated.
Step to reproduce
Inside a plugin try to get the settings to the currently changed context:
// This always returns `mgr`, which sort of is correct:
$contextKey = $modx->context instanceof modContext || $modx->context instanceof \MODX\Revolution\modContext ? $modx->context->get('key') : 'web';
$settings = $clientConfig->getSettings($contextKey);
Observed/Expected behavior
There is currently no way to know which context got changed. When the event is invoked, it would be beneficial to also send the context-key of the currently changed context.
Environment
ClientConfig 2.3.3-pl
MODX Revolution 2.8.5-pl