Allow full management of override plugins

Created on 14 October 2022, about 2 years ago
Updated 22 April 2023, over 1 year ago

Problem/Motivation

Symfony Mailer provides a back-compatibility module that overrides email building in other modules using an EmailBuilder plugin. These cause hook_mail() to be skipped, and instead the EmailBuilder generates the email using Email Policy configuration from this module. This module imports legacy configuration to generate equivalent Email Policy

Some sites may prefer to disable some or all of the override plugins to keep sending in compatibility mode.

Proposed resolution

We can replace the existing "Import" page with an "Override" page that handles both enabling and config importing as clearly the two are closely related.

GUI

  • Rename "Import" page to "Override".
  • 3 states: disabled, enabled, imported.
  • 3 operations: "Enable & import", "Enable" (no import, just default policy) "Disable" (also deletes policy).
  • Remove "Import All", instead have a table row for "All".
  • Similar changes for drush.

Code

  • Create a function to access this configuration OverrideManager::isEnabled()
  • Conditionally disable the plugins in symfony_mailer_mailer_builder_info_alter()
  • Conditionally disable the corresponding hooks: symfony_mailer_bc_form_alter(), MailerBcConfigOverride and any others.
  • Move config currently in symfony_mailer_bc/config/optional to new directory at same level mailer_override.
  • Code to import config from */config/mailer_override
  • New value in EmailBuilder annotation: "override_warning".

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom adamps

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024