Problem/Motivation

The advancedqueue_mail_symfony_mailer submodule references the email_factory service (and Drupal\symfony_mailer\EmailFactoryInterface) which was removed in Symfony Mailer 2.x. This causes a fatal error.

Steps to reproduce

1. Install drupal/advancedqueue_mail:1.0.0 with drupal/symfony_mailer:2.0.1
2. Enable the advancedqueue_mail_symfony_mailer module
3. Run drush cr or access the web server
4. get The service "advancedqueue_mail.mail_sender" has a dependency on a non-existent service "email_factory

Proposed resolution

Update to use the new Symfony Mailer 2.x API (Drupal\symfony_mailer\MailerPlusInterface or equivalent) instead of the removed EmailFactoryInterface / email_factory service. The service provider and SymfonyMailerMailSender class need to be updated to align with the 2.x service container.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

aren33k created an issue. See original summary.

aren33k’s picture

Title: The service "advancedqueue_mail.mail_sender" has a dependency on a non-existent service "email_factory" » Symfony Mailer 2.x compatibility
Issue summary: View changes

aren33k’s picture

Assigned: aren33k » Unassigned
Status: Active » Needs review

Needs more testing

svendecabooter’s picture

There is no way to make this work for Symfony Mailer 2.x, while keeping compatibility with 1.x, I assume?

aren33k’s picture

@svendecabooter no I don't think so. I suggest that we make a 2.x version release for this as well.

svendecabooter’s picture

Status: Needs review » Needs work

I'm working on a solution that would provide support for both 1.x and 2.x simultaneously.

svendecabooter changed the visibility of the branch 3592374-the-service-advancedqueuemail.mailsender to hidden.

svendecabooter’s picture

Status: Needs work » Needs review

New branch has been added to support both symfony_mailer 1.x and 2.x.
This still needs real-life testing with both versions of the module.

aren33k’s picture

Assigned: Unassigned » aren33k
svendecabooter’s picture

Assigned: aren33k » Unassigned

Local tests with both versions are working as expected.
If someone can test this on their Mailer Plus 2.x project to check if it works there as well, then this can be committed.

svendecabooter’s picture

Title: Symfony Mailer 2.x compatibility » Symfony Mailer (Mailer Plus) 2.x compatibility
aren33k’s picture

Status: Needs review » Reviewed & tested by the community

@svendecabooter Just tested this on a fresh local D11 installation + advancedqueue + Mailer Plus 2.0.1 + advancedqueue_mail. Works as expected.

  • svendecabooter committed b11d771d on 1.0.x
    task: #3592374 Symfony Mailer (Mailer Plus) 2.x compatibility
    
    By:...
svendecabooter’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.