diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec7ec0d..fc030b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [ pull_request, push ] +on: + pull_request: + push: + branches: + - 'main' env: COMPOSER_UPDATE_FLAGS: "--no-interaction --no-progress --prefer-dist " @@ -18,6 +22,8 @@ jobs: - php: 7.4 # should use monolog v2 - php: 8.0 # should use monolog v2 - php: 8.1 # should use monolog v3 + - php: 8.2 # should use monolog v3 + - php: 8.3 # should use monolog v3 steps: - uses: actions/checkout@v2 diff --git a/src/SentryHandler.php b/src/SentryHandler.php index 0919cc2..01c91fc 100644 --- a/src/SentryHandler.php +++ b/src/SentryHandler.php @@ -34,9 +34,6 @@ trait CompatibilityProcessingHandlerTrait */ abstract protected function doWrite($record): void; - /** - * {@inheritdoc} - */ protected function write(LogRecord $record): void { $this->doWrite($record); @@ -104,9 +101,6 @@ trait CompatibilityProcessingHandlerTrait */ abstract protected function doWrite($record): void; - /** - * {@inheritdoc} - */ protected function write(array $record): void { $this->doWrite($record); @@ -183,9 +177,6 @@ public function __construct( $this->hub = $hub; } - /** - * {@inheritdoc} - */ public function handleBatch(array $records): void { if (!$records) { diff --git a/tests/SentryHandlerTest.php b/tests/SentryHandlerTest.php index 5495bfc..27e6854 100644 --- a/tests/SentryHandlerTest.php +++ b/tests/SentryHandlerTest.php @@ -461,7 +461,7 @@ public function testHandleBatchWithHighLevelOfFilteringDoesNotCrash(): void $this->assertNull($this->transport->spiedEvent); } - private function assertCapturedEvent(Severity $severity, string $message, array $extra, \Exception $exception = null, array $breadcrumbs = []): void + private function assertCapturedEvent(Severity $severity, string $message, array $extra, ?\Exception $exception = null, array $breadcrumbs = []): void { $event = $this->transport->getSpiedEvent(); @@ -531,7 +531,7 @@ static function (Breadcrumb $breadcrumb) { /** * @param Logger::* $level */ - private function createSentryHandler(int $level = null): SpySentryHandler + private function createSentryHandler(?int $level = null): SpySentryHandler { if (null === $level) { $handler = new SpySentryHandler($this->hub); @@ -552,13 +552,11 @@ class SpySentryHandler extends SentryHandler */ public $afterWriteCalled = false; - /** {@inheritdoc} */ protected function processScope(Scope $scope, $record, Event $sentryEvent): void { $scope->setExtra('processScope', 'called'); } - /** {@inheritdoc} */ protected function afterWrite(): void { $this->afterWriteCalled = true;