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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dragonwize created an issue. See original summary.

dragonwize’s picture

Status: Active » Needs review
FileSize
1.8 KB
john_a’s picture

Merging this, many thanks dragonwize

john_a’s picture

Status: Needs review » Patch (to be ported)

  • dragonwize authored bb39969 on 8.x-1.x
    Issue #3165129 by dragonwize: Use LoggerChannelFactoryInterface
    
john_a’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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