Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The MarketingCloudService class is the Drupal logger but type hinting it as the core implementation instead of the interface. This is an issue when a different implementation is used as it will through an error.
Steps to reproduce
Use a different logger channel factory. An example to follow or use would be the redirect_404 module inside the redirect module.
logger.redirect_404:
public: false
class: \Drupal\redirect_404\Render\Redirect404LogSuppressor
decorates: logger.factory
arguments: ['@logger.redirect_404.inner', '@config.factory']
Proposed resolution
Change the type hint to use the interface.
Remaining tasks
none
User interface changes
none
API changes
none
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#2 | use-loggerchannelfactoryinterface-3165129-2.patch | 1.8 KB | dragonwize |
|
Comments
Comment #2
dragonwize CreditAttribution: dragonwize commentedComment #3
john_a CreditAttribution: john_a as a volunteer commentedMerging this, many thanks dragonwize
Comment #4
john_a CreditAttribution: john_a as a volunteer commentedComment #6
john_a CreditAttribution: john_a as a volunteer commented