Rewrite Drush commands to support Drush 9 and higher

Created on 29 June 2020, over 4 years ago
Updated 1 February 2023, almost 2 years ago

Add support Drush 9 and higher.

We can refactor 'https://git.drupalcode.org/project/unused_modules/-/blob/8.x-1.x/unused_...' as baseline.
Let's try to keep supporting Drush 8 and below, because that is still used a lot.

https://www.computerminds.co.uk/drupal-code/how-write-your-own-drush-com...
https://gbyte.co/blog/creating-drush-9-commands-and-porting-legacy-commands

Original report

I installed module unused_modules on my Drupal 8.9.1 system (Drush version : 10.2.2) using composer. The module works fine when called via the admin gui. When trying to run drush unused-modules from the KDE konsole command line (Kubuntu 20.04) I get the message "Command "unused-modules" is not defined". I wonder what's wrong.
Thanks for your help.
Regards
H. Stoellinger

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇹Austria hstoellinger Salzburg

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024