Skip to content

Commit

Permalink
Fix for serializable config
Browse files Browse the repository at this point in the history
  • Loading branch information
LauJosefsen committed Feb 19, 2024
1 parent ba570f4 commit 2a833be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FilebeatLoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __invoke(array $config): Logger
$logger->pushProcessor(new FilebeatContextProcessor($extras));

if (isset($config['httpContextProcessor'])) {
$logger->pushProcessor($config['httpContextProcessor']);
$logger->pushProcessor(new $config['httpContextProcessor']());

Check failure on line 31 in src/FilebeatLoggerFactory.php

View workflow job for this annotation

GitHub Actions / phpstan (8.1)

Parameter #1 $callback of method Monolog\Logger::pushProcessor() expects callable(Monolog\LogRecord): Monolog\LogRecord, object given.

Check failure on line 31 in src/FilebeatLoggerFactory.php

View workflow job for this annotation

GitHub Actions / phpstan (8.2)

Parameter #1 $callback of method Monolog\Logger::pushProcessor() expects callable(Monolog\LogRecord): Monolog\LogRecord, object given.
} else {
$logger->pushProcessor(new FilebeatHttpContextProcessor());
}
Expand Down

0 comments on commit 2a833be

Please sign in to comment.