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'];