From b85b4b80b1135714bca7bcd794f9560dd6034599 Mon Sep 17 00:00:00 2001 From: Sperling-0 Date: Thu, 25 Jan 2024 11:17:26 +0100 Subject: [PATCH] Update Monolog to version 3 This fixes https://github.com/airbrake/phpbrake/issues/117 --- composer.json | 2 +- src/MonologHandler.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 564597e..6f8478b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "psy/psysh": "^0.11", "phpunit/phpunit": "^10.0", "squizlabs/php_codesniffer": "^3.7", - "monolog/monolog": "^1.22|^2.0", + "monolog/monolog": "^2.0|^3.0", "mikey179/vfsstream": "^1.6" }, "suggest": { diff --git a/src/MonologHandler.php b/src/MonologHandler.php index d3ca3e0..d68b122 100644 --- a/src/MonologHandler.php +++ b/src/MonologHandler.php @@ -3,6 +3,7 @@ namespace Airbrake; use Monolog\Logger; +use Monolog\LogRecord; /** * Monolog handler that sends logs to Airbrake. @@ -28,7 +29,7 @@ public function __construct(\Airbrake\Notifier $notifier, $level = Logger::ERROR /** * {@inheritdoc} */ - protected function write(array $record): void + protected function write(LogRecord $record): void { if (isset($record['context']['exception'])) { $exc = $record['context']['exception'];