Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Add PHP 8.2 and 8.3 in CI #34

Merged
merged 3 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading