Problem/Motivation
The problem is introduce in #3201043: Submodule sendgrid_integration_reports needs to be more flexible
which
use Drupal\Core\Logger\LoggerChannelFactory;
instead of
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
It will cause issues when you are using other logger modules replacing core logger.
Steps to reproduce
Install / enable Monolog module or other another logger modules that will replace core logger with a different implementation.
try do anything (e.g. drush cr), you got errors like
Fatal error: Uncaught TypeError: Argument 3 passed to Drupal\sendgrid_integration_reports\Api::__construct() must be an instance of Drupal\Core\Logger\LoggerChannelFactory, instance of Drupal\monolog\Logger\MonologLoggerChannelFactory given, called in /var/www/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 and defined in /var/www/web/modules/contrib/sendgrid_integration/modules/sendgrid_integration_reports/src/Api.php:84
Proposed resolution
change all occurrences of LoggerChannelFactory to LoggerChannelFactoryInterface.
Remaining tasks
Patch.
User interface changes
API changes
Data model changes
Issue fork sendgrid_integration-3211754
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 #3
yang_yi_cn commentedA similar error on the same file, actually.
Fix is to change CacheFactory to CacheFactoryInterface.
Committed on the same branch / MR.
Comment #4
perignon commentedMerged PR.
You may want to check out the 2.x Alpha.
Comment #6
lambic commentedCan we get this same change merged to the 2.x branch?
Comment #7
perignon commentedI just cherry-picked the change into 8.x-2.x, give it a shot.
Comment #8
lambic commentedworks, thanks!