We asked around in the #contribute slack channel whether the environment switching feature (#3536307: Execution environment: Safely run code inside an environment with partially substituted system state / config) could be of any use for contrib modules. There was very little feedback from contrib maintainers.
Drupal 11.3 is close to feature freeze. At this point it is unlikely that any of the open issues will land in the release. All of the participants are willing to continue for another period (i.e., Drupal 11.4).
We spend quite some time reviewing the yaml plugin approach (#3539651: Introduce email plugins). The following points have been brought up and need more investigation:
- The EmailBase plugin class makes it easy to implement simple emails (subject and HTML body). It isn’t clear from the docs or from the code how advanced use cases would be tackled. (It is possible to write subject and body methods which accept the Symfony Email object as a parameter, but that is neither obvious nor is it intuitive).
- The EmailBase plugin class currently respects the EmailSubject and EmailBody attributes. Is there a way to make that mechanism extensible (i.e., attributes defined in contrib and custom modules without having to modify the base class)?
- There is an expectation that every aspect of an email can be defined in the plugin class, including the recipient list. The current merge request is quite opinionated in this regard and somewhat enforces that to, cc, bcc is set at the call-site while subject and contents is set in the plugin class.
- Is there still a reason for the module/key declaration in the {module}.email.yml file? It could be useful to group mails in the user interface (e.g. for the mailsystem module). There is some precedent in deriving group labels from modules. E.g. BreakpointManager::getGroupLabel()
- In the current merge request it is necessary to add a theme hook if a module wants to supply its own template for an email (or all emails defined by the module). Theme suggestions only work for twig templates supplied by themes and not for ones in modules. Could that be made more intuitive?
Next planning meeting takes place December 3rd at 4PM UTC+1.
Comments
Comment #2
znerol commentedComment #3
znerol commentedComment #4
xjmJust confirming that since the Mailer module is not beta yet, I have removed it from the 11.3.x branch. It will remain in 11.x for development. The
core/libtraits and such will remain in place in 11.3.x because we don't alter those libraries between branches. Thanks for all your work on this module!Comment #5
znerol commentedThank you @xjm
I'd prefer to resolve #3542264: Rename mailer module to mailer_symfony and avoid namespace conflict with contrib mailer module before the module is part of a release.
Comment #6
znerol commented