psr/log interface change breaks EventLog::log() implementation on Drupal 10

Created on 4 May 2023, over 1 year ago
Updated 16 May 2023, over 1 year ago

Problem/Motivation

When updating to Drupal 10 I encountered the following error:

Declaration of Drupal\elogger\Logger\EventLog::log($level, $message, array $context = []) must be compatible with Drupal\Core\Logger\RfcLoggerTrait::log($level, Stringable|string $message, array $context = []): void

The psr/log interface has changed in v3 which is what is being used on Drupal 10.

Proposed resolution

The associated change record β†’ states that adding the void return type only without updating the argument type hints will allow compatibility on D10 without breaking things on D9.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States markdorison

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

Comments & Activities

Production build 0.71.5 2024