Use \Psr\Log\LoggerInterface instead of LoggerChannel

Created on 9 November 2022, about 2 years ago
Updated 24 February 2023, almost 2 years ago

Problem/Motivation

Class SvgResponsiveImageFormatter uses the \Drupal\Core\Logger\LoggerChannel rather than \Psr\Log\LoggerInterface. The use of a class instead of a constructor is not correct (as it breaks compatibility with other modules, e.g. monolog); moreover, LoggerChannelInterface might get deprecated in the future: https://www.drupal.org/project/drupal/issues/2760433 📌 Deprecate/remove LoggerChannelInterface Needs work .

Steps to reproduce

Install and enable both svg_image_responsive and monolog, and get a PHP error after adding an svg media.

Proposed resolution

Replace LoggerChannel with LoggerInterface.

📌 Task
Status

Needs review

Version

3.0

Component

Code

Created by

🇮🇹Italy nironan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024