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
Issue fork do_username-3472367
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
Comment #2
hussainwebComment #3
hussainwebLet's not make this more complex than it needs to be and we'll just remove the line, like others have.
Comment #5
hussainwebComment #7
hussainweb