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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3530437-use-logger-channel-interface.patch | 1.32 KB | jeff.hartman |
Issue fork acquia_dam-3530437
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
jeff.hartman commentedComment #5
rajeshreeputraThe error occurs because the
AssetFileEntityHelperconstructor requires a strict LoggerChannel type. Updated the type hint inAssetFileEntityHelper.phpto use the interface instead.Comment #8
japerry