Skip to content

Commit

Permalink
Merge pull request #15 from spiral/maintenance
Browse files Browse the repository at this point in the history
Update metafiles
  • Loading branch information
roxblnfk authored Aug 20, 2024
2 parents 7a42ffc + 5a2cab8 commit 3f25e4f
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 69 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{yml, yaml, sh, conf, neon*}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
16 changes: 15 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
/tests export-ignore
* text=auto

.github export-ignore
tests export-ignore
.* export-ignore
composer.lock export-ignore
composer-require-* export-ignore
Makefile export-ignore
phpunit.xml* export-ignore
pest.xml* export-ignore
psalm.* export-ignore
psalm-baseline.xml export-ignore
dload.xml export-ignore
infection.* export-ignore
codecov.* export-ignore
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: spiral
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea/
.env
composer.lock
vendor/
/runtime/
/vendor/
*.db
clover.xml
clover.xml
117 changes: 77 additions & 40 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,80 @@
{
"name": "spiral/sentry-bridge",
"type": "library",
"description": "Sentry Exception Handler for Spiral",
"license": "MIT",
"authors": [
{
"name": "Anton Titov / Wolfy-J",
"email": "[email protected]"
"name": "spiral/sentry-bridge",
"type": "library",
"description": "Sentry Exception Handler for Spiral",
"license": "MIT",
"support": {
"issues": "https://github.com/spiral/grpc-client/issues",
"source": "https://github.com/spiral/grpc-client",
"docs": "https://spiral.dev/docs",
"chat": "https://discord.gg/V6EK4he"
},
"authors": [
{
"name": "Anton Titov (wolfy-j)",
"email": "[email protected]"
},
{
"name": "Pavel Butchnev (butschster)",
"email": "[email protected]"
},
{
"name": "Aleksei Gagarin (roxblnfk)",
"email": "[email protected]"
},
{
"name": "Maksim Smakouz (msmakouz)",
"email": "[email protected]"
}
],
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/spiral"
}
],
"require": {
"php": ">=8.1",
"spiral/boot": "^3.0",
"spiral/snapshots": "^3.0",
"sentry/sentry": "^4.0",
"psr/http-factory": "^1.0.1",
"psr/http-message": "^1.0.1 || ^2.0",
"php-http/curl-client": "^2.3.1"
},
"require-dev": {
"vimeo/psalm": "^5.25",
"psr/log": "^3.0",
"spiral/testing": "^2.6"
},
"autoload": {
"psr-4": {
"Spiral\\Sentry\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Spiral\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"php-http/discovery": true
}
},
"scripts": {
"psalm": "psalm",
"psalm:baseline": "psalm --set-baseline=psalm-baseline.xml",
"psalm:ci": "psalm --output-format=github --shepherd --show-info=false --stats --threads=4",
"test": [
"@putenv XDEBUG_MODE=coverage",
"phpunit --color=always"
],
"test:cc": [
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-clover=runtime/phpunit/logs/clover.xml --color=always"
]
}
],
"require": {
"php": ">=8.1",
"spiral/boot": "^3.0",
"spiral/snapshots": "^3.0",
"sentry/sentry": "^4.0",
"psr/http-factory": "^1.0.1",
"psr/http-message": "^1.0.1 || ^2.0",
"php-http/curl-client": "^2.3.1"
},
"require-dev": {
"vimeo/psalm": "^5.17",
"psr/log": "^3.0",
"spiral/testing": "^2.6"
},
"autoload": {
"psr-4": {
"Spiral\\Sentry\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Spiral\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
50 changes: 29 additions & 21 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
stopOnError="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory>src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Sentry Exception Handler for Spiral">
<directory>./tests/</directory>
</testsuite>
</testsuites>
cacheResultFile="runtime/phpunit/result.cache"
failOnWarning="true"
failOnRisky="true"
executionOrder="random"
stderr="true"
beStrictAboutOutputDuringTests="true"
>
<testsuites>
<testsuite name="Sentry Exception Handler for Spiral">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="runtime/coverage"/>
<text outputFile="runtime/coverage.txt"/>
<clover outputFile="runtime/logs/clover.xml"/>
</report>
</coverage>
<source>
<include>
<directory>src</directory>
</include>
<exclude>
<directory>tests</directory>
</exclude>
</source>
</phpunit>
58 changes: 58 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<file src="src/Bootloader/ClientBootloader.php">
<MixedArgument>
<code><![CDATA[$env->get('APP_ENV')]]></code>
<code><![CDATA[$env->get('APP_VERSION')]]></code>
<code><![CDATA[$env->get('SENTRY_DSN', '')]]></code>
</MixedArgument>
</file>
<file src="src/Client.php">
<MixedArgument>
<code><![CDATA[$event]]></code>
<code><![CDATA[$state->getTags()]]></code>
<code><![CDATA[$state->getVariables()]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code><![CDATA[$event->getContext()]]></code>
</MixedArgumentTypeCoercion>
<MixedAssignment>
<code><![CDATA[$event]]></code>
<code><![CDATA[$state]]></code>
</MixedAssignment>
<MixedMethodCall>
<code><![CDATA[getLogEvents]]></code>
<code><![CDATA[getTags]]></code>
<code><![CDATA[getVariables]]></code>
</MixedMethodCall>
</file>
<file src="src/Config/SentryConfig.php">
<MixedInferredReturnType>
<code><![CDATA[?float]]></code>
<code><![CDATA[?string]]></code>
<code><![CDATA[?string]]></code>
<code><![CDATA[bool]]></code>
<code><![CDATA[float]]></code>
<code><![CDATA[string]]></code>
</MixedInferredReturnType>
<MixedReturnStatement>
<code><![CDATA[$this->config['dsn']]]></code>
<code><![CDATA[$this->config['environment'] ?? $_SERVER['SENTRY_ENVIRONMENT'] ?? null]]></code>
<code><![CDATA[$this->config['environment'] ?? $_SERVER['SENTRY_ENVIRONMENT'] ?? null]]></code>
<code><![CDATA[$this->config['release'] ?? $_SERVER['SENTRY_RELEASE'] ?? null]]></code>
<code><![CDATA[$this->config['release'] ?? $_SERVER['SENTRY_RELEASE'] ?? null]]></code>
<code><![CDATA[$this->config['sample_rate']]]></code>
<code><![CDATA[$this->config['send_default_pii'] ?? false]]></code>
<code><![CDATA[$this->config['send_default_pii'] ?? false]]></code>
<code><![CDATA[$this->config['traces_sample_rate']]]></code>
</MixedReturnStatement>
</file>
<file src="src/Http/RequestScope.php">
<MixedInferredReturnType>
<code><![CDATA[?ServerRequestInterface]]></code>
</MixedInferredReturnType>
<MixedReturnStatement>
<code><![CDATA[$this->container->get(ServerRequestInterface::class)]]></code>
</MixedReturnStatement>
</file>
</files>
12 changes: 7 additions & 5 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="1"
findUnusedBaselineEntry="false"
findUnusedCode="false"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src"/>
Expand Down

0 comments on commit 3f25e4f

Please sign in to comment.