Problem/Motivation

Our drush command has the following issues:

  • Using drush.services.yml for service registration is deprecated
  • Using Drush #[Command] attribute instead of Symfony's #[AsCommand] is deprecated
  • Extending DrushCommands base class is deprecated
  • Located in src/Commands/ instead of src/Drush/Commands/

Steps to reproduce

Proposed resolution

  • Delete drush.services.yml and use AutowireTrait for dependency injection
  • Move command to src/Drush/Commands/PrometheusExportCommand.php
  • Extend Symfony\Component\Console\Command\Command directly
  • Use #[AsCommand] attribute
  • Remove obsolete extra.drush.services from composer.json

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

kim.pepper created an issue. See original summary.

  • kim.pepper committed 9e20a57d on 2.x
    task: #3591453 Modernize Drush command for Drush 13.7+ (Symfony Console...
kim.pepper’s picture

Status: Active » Fixed

Committed to 2.x

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.