Problem/Motivation

To be able to use the Monolog module (https://www.drupal.org/project/monolog) on a site which also uses the Acquia DAM module.

Steps to reproduce

composer require 'drupal/monolog:^3.0'
drush en monolog

Results in:
TypeError: Drupal\acquia_dam\AssetFileEntityHelper::__construct(): Argument #6 ($loggerChannel) must be of type Drupal\Core\Logger\LoggerChannel, Drupal\monolog\Logger\LoggerInterfacesAdapter given, called in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 in Drupal\acquia_dam\AssetFileEntityHelper->__construct() (line 114 of /var/www/html/docroot/modules/contrib/acquia_dam/src/AssetFileEntityHelper.php)

Proposed resolution

Update AssetFileEntityHelper to use LoggerChannelInferface.

Issue fork acquia_dam-3530437

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

jeff.hartman created an issue. See original summary.

jeff.hartman’s picture

StatusFileSize
new1.32 KB

rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

Version: 1.1.2 » 1.1.x-dev
Status: Active » Needs review

The error occurs because the AssetFileEntityHelper constructor requires a strict LoggerChannel type. Updated the type hint in AssetFileEntityHelper.php to use the interface instead.

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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