Skip to content

Commit

Permalink
Merge pull request #34 from B-Galati/php-82-83
Browse files Browse the repository at this point in the history
  • Loading branch information
B-Galati authored Feb 3, 2024
2 parents 807572c + 042c14e commit 89baf38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 "
Expand All @@ -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

Expand Down
9 changes: 0 additions & 9 deletions src/SentryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ trait CompatibilityProcessingHandlerTrait
*/
abstract protected function doWrite($record): void;

/**
* {@inheritdoc}
*/
protected function write(LogRecord $record): void
{
$this->doWrite($record);
Expand Down Expand Up @@ -104,9 +101,6 @@ trait CompatibilityProcessingHandlerTrait
*/
abstract protected function doWrite($record): void;

/**
* {@inheritdoc}
*/
protected function write(array $record): void
{
$this->doWrite($record);
Expand Down Expand Up @@ -183,9 +177,6 @@ public function __construct(
$this->hub = $hub;
}

/**
* {@inheritdoc}
*/
public function handleBatch(array $records): void
{
if (!$records) {
Expand Down
6 changes: 2 additions & 4 deletions tests/SentryHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 89baf38

Please sign in to comment.