Update Drush commands for Drush 12/13

Created on 25 July 2024, 9 months ago
Updated 24 August 2024, 8 months ago

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

-

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tim-diels
  • Assigned to sourav_paul
  • Merge request !50Update Drush commands to support Drush 12+ → (Open) created by tim-diels
  • Issue was unassigned.
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

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

  • Pipeline finished with Success
    9 months ago
    Total: 141s
    #233707
  • Status changed to Needs review 9 months ago
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

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

  • 🇮🇳India sourav_paul Kolkata

    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.

  • 🇺🇸United States shelane

    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.

  • Status changed to Needs work 8 months ago
  • 🇨🇭Switzerland berdir Switzerland

    > 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.

  • 🇫🇷France andypost

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

Production build 0.71.5 2024