-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from pj8/drop-php74-php80
Drop PHP7.4 & PHP8.0
- Loading branch information
Showing
30 changed files
with
928 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: '#^Method Pj8\\SentryModule\\ResourceSpanFactory\:\:__invoke\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/ResourceSpanFactory.php | ||
|
||
- | ||
message: '#^Method Pj8\\SentryModule\\ResourceTrace\:\:start\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/ResourceTrace.php | ||
|
||
- | ||
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.StaticAccess\)\)\: Unexpected token "\.StaticAccess\)", expected ''\)'' at offset 27 on line 1$#' | ||
identifier: phpDoc.parseError | ||
count: 1 | ||
path: src/ResourceTrace.php | ||
|
||
- | ||
message: '#^Method Pj8\\SentryModule\\ResourceTraceInterface\:\:start\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/ResourceTraceInterface.php | ||
|
||
- | ||
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.CouplingBetweenObjects\)\)\: Unexpected token "\.CouplingBetweenObjects\)", expected ''\)'' at offset 27 on line 1$#' | ||
identifier: phpDoc.parseError | ||
count: 1 | ||
path: src/SentryModule.php | ||
|
||
- | ||
message: '#^Method Pj8\\SentryModule\\SpanContextFactory\:\:__invoke\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/SpanContextFactory.php | ||
|
||
- | ||
message: '#^Method Pj8\\SentryModule\\SpanContextFactory\:\:getGenericContext\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/SpanContextFactory.php | ||
|
||
- | ||
message: '#^Method Pj8\\SentryModule\\SpanContextFactoryInterface\:\:__invoke\(\) has parameter \$invocation with generic interface Ray\\Aop\\MethodInvocation but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/SpanContextFactoryInterface.php | ||
|
||
- | ||
message: '#^Class Pj8\\SentryModule\\TransactionNameProvider implements generic interface Ray\\Di\\ProviderInterface but does not specify its types\: T$#' | ||
identifier: missingType.generics | ||
count: 1 | ||
path: src/TransactionNameProvider.php | ||
|
||
- | ||
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.Superglobals\)\)\: Unexpected token "\.Superglobals\)", expected ''\)'' at offset 27 on line 1$#' | ||
identifier: phpDoc.parseError | ||
count: 1 | ||
path: src/TransactionNameProvider.php | ||
|
||
- | ||
message: '#^Comparison operation "\<" between int\<80100, 80499\> and 80100 is always false\.$#' | ||
identifier: smaller.alwaysFalse | ||
count: 1 | ||
path: tests/ResourceInterceptorTest.php | ||
|
||
- | ||
message: '#^Property Pj8\\SentryModule\\ResourceInterceptorTest\:\:\$trace \(Pj8\\SentryModule\\ResourceTrace\|null\) is never assigned null so it can be removed from the property type\.$#' | ||
identifier: property.unusedType | ||
count: 1 | ||
path: tests/ResourceInterceptorTest.php | ||
|
||
- | ||
message: '#^Property Pj8\\SentryModule\\ResourceInterceptorTest\:\:\$transaction \(Pj8\\SentryModule\\Transaction\|null\) is never assigned null so it can be removed from the property type\.$#' | ||
identifier: property.unusedType | ||
count: 1 | ||
path: tests/ResourceInterceptorTest.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 6 | ||
paths: | ||
- src | ||
- tests | ||
checkGenericClassInNonGenericObjectType: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0"> | ||
<file src="src/TransactionNameProvider.php"> | ||
<MissingTemplateParam> | ||
<code><![CDATA[ProviderInterface]]></code> | ||
</MissingTemplateParam> | ||
</file> | ||
<file src="tests/MonitorInterceptorTest.php"> | ||
<InvalidArgument> | ||
<code><![CDATA[$invocation]]></code> | ||
</InvalidArgument> | ||
</file> | ||
<file src="tests/ResourceInterceptorTest.php"> | ||
<InvalidArgument> | ||
<code><![CDATA[$invocation]]></code> | ||
<code><![CDATA[$invocation]]></code> | ||
</InvalidArgument> | ||
</file> | ||
<file src="tests/ResourceTraceTest.php"> | ||
<InvalidArgument> | ||
<code><![CDATA[$invocation]]></code> | ||
<code><![CDATA[$invocation]]></code> | ||
</InvalidArgument> | ||
</file> | ||
</files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Pj8\SentryModule; | ||
|
||
use Sentry\Event; | ||
|
||
final class BeforeSend implements BeforeSendInterface | ||
{ | ||
/** @param array<string, string> $tags セットしたいタグの配列(オプション) */ | ||
public function __construct(private readonly array $tags = []) | ||
{ | ||
} | ||
|
||
public function __invoke(Event $event): Event | ||
{ | ||
if ($this->tags !== []) { | ||
$event->setTags($this->tags); | ||
} | ||
|
||
return $event; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Pj8\SentryModule; | ||
|
||
use Sentry\Event; | ||
|
||
interface BeforeSendInterface | ||
{ | ||
public function __invoke(Event $event): Event|null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.