We're including Symfony Mailer in Commerce Kickstart in addition to just generally recommending it in all of our projects. Recently, you added a email_html filter format. However, due to the way dependencies for modules and configuration import are resolved, this prevents our installation profile from installing. The error message / screenshot were originally reported in #3275136: Installation fails on a Symfony Mailer configuration dependency issue.
The reason for this is that configuration file depends on the Filter module, but the module does not enforce such a dependency. Since Filter is not installed yet during the installation process when these dependencies are being resolved, the installer fails. There are two options:
- Move the configuration file to
config/optionalinstead ofconfig/install. - Add a dependency in
symfony_mailer.info.ymlondrupal:filter.
I don't know the module well enough to judge your intent, but I've tested both of those approaches and I ultimately was able to install fine. Filter gets installed early enough that the optional config installation did not fail, and of course adding it as a dependency in the .info.yml led to proper resolution / installation.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3275333-2.filter_dependencey.patch | 345 bytes | rszrama |
Comments
Comment #2
rszrama commentedFilter is such a fundamental module in Drupal that I'm adding a patch here to take approach #2, add the dependency to Symfony Mailer, because this is an easy enough patch for me to include in Commerce Kickstart for now. Feel free to go with approach #1, though - I don't know what's ultimately best for you. 😊
(Edit: lol @ the filename typo. C'est la vie.)
Comment #4
adamps commentedThanks. I agree with approach #2.
It's interesting that you are considering this module for Commerce Kickstart. I was going to reach out to you at Commerce Guys soon - I was just waiting for the module to become a bit more stable.
Currently the integration with commerce is fairly limited, see:
I am maintainer of simplenews and I am exploring a native integration with Symfony Mailer - i.e. simplenews calls the Symfony Mailer API directly. There is a working patch on #3275129: Use Symfony Mailer API to send mails and it allows removal of 2000 lines of code from simplenews!
I would be happy to discuss options for a closer integration it you are interested.
Comment #5
rszrama commentedOh, cool! Yep, we've long used Swift Mailer but started replacing it in our projects and documentation with reference to Symfony Mailer instead. 😄
Re: increasing support for Commerce in the Symfony Mailer module directly, happy to take a look! Thus far I'd mostly confined my efforts to Commerce Email, but there we were more concerned about the triggering of emails with basic token replacement in the parameters than improving the Twig integration. (I heard from another community member of a separate module for that but hadn't had a chance to review.)
Will share the above issue in our internal channel, too.