Problem/Motivation

Remaining tasks

  • Move Commands directory into a Drush directory
  • Adapt namespace in MailerCommands
  • Inject dependencies through the create() method
  • Adapt symfony_mailer.commands path in drush.services.yml
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

MacSim created an issue. See original summary.

macsim’s picture

Status: Active » Needs review
macsim’s picture

Issue summary: View changes
macsim’s picture

Issue summary: View changes
macsim’s picture

Note: When we'll want to drop Drush 11 support, we'll just have to remove the drush.services.yml file.

adamps’s picture

Great thanks. Did you test with both Drush 11 and 12?

> Note: When we'll want to drop Drush 11 support, we'll just have to remove the drush.services.yml file.
Please could you raise an issue?

adamps’s picture

Title: Drush 12 compatibility » Drush 12 deprecations
Issue summary: View changes
Status: Needs review » Needs work

AFAICS it works without this change in Drush 12. According to https://www.drush.org/12.x/commands/, the old way is deprecated in Drush 12 and will be removed in Drush 13. This change is still a good idea, it would be clearer to update the IS and title.

To prove this patch works I suggest that we need a version that removes the services file. We won't commit it however we can check that it's working.

macsim’s picture

@AdamPS

Did you test with both Drush 11 and 12?

Nope I didn't. I thought reviewers would do it.

Please could you raise an issue?

I can but I would say that it should be done in a 1.5.x version which doesn't exist right now.
In this new module version, we should also add following lines to the composer.json:

     "conflict": {
        "drush/drush": "<12"
     }
AFAICS it works without this change in Drush 12.

Did you tried to use the command on 1.4.1 with drush 12?
Cause it should throw a "mailer:override command is undefined" error.

The doc says that drush.services.yml is deprecated in drush 12 and will be removed in Drush 13.
But it also says that

  • Drush 12 expects commandfiles to use a create() method to inject Drupal and Drush dependencies.
  • Drush 12 expects all commandfiles in the /Drush/ directory. The Drush subdirectory is a new requirement.

Those changes are required to run a command with drush 12.

adamps’s picture

Did you tried to use the command on 1.4.1 with drush 12?

Yes it is working fine for me.

adamps’s picture

Title: Drush 12 deprecations » Drush 13 support
adamps’s picture

Drush 11 is no longer supported so we should remove drush.services.yml in this issue please.

adamps’s picture

adamps’s picture

Status: Needs work » Fixed

I fixed this as part of #3482392: Create separate module mailer_override thanks for the help

Status: Fixed » Closed (fixed)

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