Skip to content

Commit

Permalink
Update Monolog to version 3
Browse files Browse the repository at this point in the history
This fixes airbrake#117
  • Loading branch information
Sperling-0 committed Jan 25, 2024
1 parent c5c3549 commit b85b4b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion src/MonologHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Airbrake;

use Monolog\Logger;
use Monolog\LogRecord;

/**
* Monolog handler that sends logs to Airbrake.
Expand All @@ -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'];
Expand Down

0 comments on commit b85b4b8

Please sign in to comment.