Orange Dam drush command output no longer prints when using Drush v 12

Created on 18 April 2024, 2 months ago

Problem/Motivation

Most of the Orange Dam module drush commands call code in classes which use LoggerChannelInterface to log output. In drush 11, this would properly send output both to the log, and to the screen.

However, this no longer works in Drush 12.

The solution decreed there is for everyone to rewrite their drush commands to use Drupal's messenger service. However, Drupal's messenger service does not write to the dblog. So presumably it will be necessary to output everything twice. Once for the log and once for the screen :(

Steps to reproduce

Call, as an example, `drush orange-dam:queue-content-item` with a bad system identifier.

Under Drush 11, you would get an error message printed to the screen.
Using Drush 12, there is no output at all.

Proposed resolution

Rewrite all code in this module that runs from drush commands to no longer use logger to render output to the screen, but messenger service as decreed.

Or, require Drush version < 12.

Remaining tasks

Create a merge request with changes.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States apotek

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

Comments & Activities

  • Issue created by @apotek
  • 🇺🇸United States apotek
  • Status changed to Needs review 2 months ago
  • 🇮🇳India Rajan Kumar@2026

    hii @apotek

    used in composer.json file drush 11

  • Status changed to Needs work 2 months ago
  • 🇺🇸United States markdorison

    @Ryan Thanks for the patch. Changes will need to be submitted as merge requests so that tests can run using GitLab CI. Additionally, your patch doesn't address the described issue or the proposed resolution. Moving this to "needs work."

  • 🇺🇸United States apotek

    Thank you @markdorison and @rajan-kumar2026. In addition to the suggestions Mark is making, I think the point of this ticket is to figure out if we want to support Drush 12 or not. Currently, our drush commands are not compatible with Drush 12. So if we are going to add

    "drush/drush": "^11 || ^12 "

    we are basically saying we support drush 12, when we _don't_ support drush 12 (yet).

    If we are going to add `^12` we will have to rewrite a lot of code in this module so that it can still output to the console. It's a big job.

Production build 0.69.0 2024