Cannot be used from CLI/Drush on Drupal 9: drush_log

Created on 17 November 2021, about 3 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

Using the module as recommended in the "Updating Entities Programmatically" Guide and then performing the update or executing the code from CLI leads to an error: TypeError: Argument 3 passed to Drush\Log\Logger::log() must be of the type array, null given. As far as I can tell, this is due to usage of the deprecated drush_log function instead of Drupal\Logger, however, documentation on drush and changes to it is somewhat hard to come by.

Steps to reproduce

Attempt to update an entity from CLI

Proposed resolution

Change drush_log/drush_print usage in EntityUpdatePrint

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany pascalhakigo

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024