- Issue created by @kevinquillen
Using Drush 13, commands fail to run with:
[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 assert()
Install Drush 13, Ultimate Cron 2.0-alpha7 (from OpenSocial distribution). Run Drush commands like uli or cr.
Replace the constructor in UltimateCronCommands as:
/**
* Constructs an UltimateCronCommands object.
*
* @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger
* Logger factory object.
*/
public function __construct(LoggerChannelFactoryInterface $logger) {
// Don't replace Drush's logger because it'll cause a fatal error on Drush
// 13 and newer.
//
// @see https://www.drupal.org/project/markdown/issues/3483437
//
// @see https://github.com/drush-ops/drush/pull/5022
if (!method_exists($this, 'logger')) {
$this->logger = $logger;
}
}
Active
2.0
Code