Problem/Motivation

See https://www.drush.org/12.x/commands/ for details.

Steps to reproduce

When using Drush 12, the commands can not be run anymore.

Proposed resolution

Basic steps that apply to this module are:

Change namespace and class naming according to https://www.drush.org/12.x/commands/#auto-discovered-commands-psr4

Use PHP attributes for Drush command definitions, as per https://www.drush.org/12.x/commands/#attributes-or-annotations

Change class name in drush.services.yml for when class is not autoloaded.

Add use statement for Drush PHP attribute class.

Remaining tasks

Create and review MR

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

tim-diels created an issue. See original summary.

sourav_paul’s picture

Assigned: Unassigned » sourav_paul

tim-diels’s picture

Assigned: sourav_paul » Unassigned

@Sourav_Paul Sorry I was already doing the code changes while making the issue.

tim-diels’s picture

Status: Active » Needs review

The pipeline issues are not from the code changes. I even fixed some of the existing ones.
This can be reviewed.

sourav_paul’s picture

Okay no problem, but whenever you start working on any issue don't forget to assign it yourself first, It would be helpful for others.

shelane’s picture

It looks like this should now be updated for Drush 12.5+ that removes the drush.services.yml file completely and includes the services through autowire.

berdir’s picture

Status: Needs review » Needs work

> When using Drush 12, the commands can not be run anymore.

The commands work fine for me even on drush 13 on drupal 11, so I'm not sure where this comes from.

It makes sense to update it, but per #7, should then actually use autowire.

As it is, this is pretty disruptive to a lot of other issues and merge requests that extend drush commands and I don't plan on merging this soon unless it becomes necessary.

andypost’s picture

Title: Update Drush commands for Drush 12 » Update Drush commands for Drush 12/13

Also it needs to update drush.services.yml for 13