Move onSettingsChange from Bridge service to SettingsChangeHandler
Bridge is a low level service that processes requests and responses to/from Bridge API. This change is needed so that we can remove dependency on MailPoet\Util\License\Features\Subscribers service from the Bridge. The dependecy is a higher level service and may easily cause a circular dependency issue. The SettingsChangeHandler is service for handling side effects when saving settings. This feels as a better place to put the functionality. [MAILPOET-5191]
This commit is contained in:
committed by
Veljko V
parent
ab19ef92d5
commit
cd5a023b35
@ -150,7 +150,7 @@ class Settings extends APIEndpoint {
|
||||
|
||||
// when pending approval, leave this to cron / Key Activation tab logic
|
||||
if (!$this->servicesChecker->isMailPoetAPIKeyPendingApproval()) {
|
||||
$this->bridge->onSettingsSave($settings);
|
||||
$this->settingsChangeHandler->updateBridge($settings);
|
||||
}
|
||||
|
||||
$meta = $this->authorizedEmailsController->onSettingsSave($settings);
|
||||
|
Reference in New Issue
Block a user