TruncateMessagesProcessor::__invoke(array $record) must be compatible with ProcessorInterface::__invoke

Created on 19 January 2024, over 1 year ago
Updated 2 February 2024, over 1 year ago

Problem/Motivation

Error on Monolog extra processor:

wodby@php.container:/var/www/html $ drush updb
[19-Jan-2024 07:19:47 UTC] PHP Fatal error:  Declaration of Drupal\monolog_extra\Logger\Processor\TruncateMessagesProcessor::__invoke(array $record) must be compatible with Monolog\Processor\ProcessorInterface::__invoke(Monolog\LogRecord $record) in /var/www/html/docroot/modules/contrib/monolog_extra/src/Logger/Processor/TruncateMessagesProcessor.php on line 35

Fatal error: Declaration of Drupal\monolog_extra\Logger\Processor\TruncateMessagesProcessor::__invoke(array $record) must be compatible with Monolog\Processor\ProcessorInterface::__invoke(Monolog\LogRecord $record) in /var/www/html/docroot/modules/contrib/monolog_extra/src/Logger/Processor/TruncateMessagesProcessor.php on line 35
 [warning] Drush command terminated abnormally.

Proposed resolution

Monolog invoke method should use LogRecord instead for array https://github.com/Seldaek/monolog/blob/main/UPGRADE.md

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024