Problem/Motivation

When using Drush 13, I see this error.

AssertionError: Instead of using replacing Drush's logger, use $this->add() on DrushLoggerManager to add a custom logger. See https://github.com/drush-ops/drush/pull/5022 in /var/www/html/vendor/drush/drush/src/Commands/DrushCommands.php on line 76 #0 /var/www/html/vendor/drush/drush/src/Commands/DrushCommands.php(76): assert()
#1 /var/www/html/vendor/drush/drush/src/Runtime/ServiceManager.php(480): Drush\Commands\DrushCommands->logger()
#2 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(282): Drush\Runtime\ServiceManager->inflect()
#3 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(218): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()
...

Steps to reproduce

Upgrade to Drush 13 and try to run any Drush command.

Proposed resolution

The problem comes from src/Commands/DOCopyFieldValues.php:33. We set the logger to our specific channel there. We need to add the logger instead of replacing it so that we can still write messages to Drupal's log table. We should remove the line.

Remaining tasks

Fix and patch.

User interface changes

None

API changes

None

Data model changes

None

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

hussainweb created an issue. See original summary.

hussainweb’s picture

Issue tags: +Drush 13
hussainweb’s picture

Issue summary: View changes

Let's not make this more complex than it needs to be and we'll just remove the line, like others have.

hussainweb’s picture

Status: Active » Needs review

hussainweb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.