diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..24e64d5 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.gitattributes b/.gitattributes index bdd4ea2..d775c20 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,15 @@ -/tests export-ignore \ No newline at end of file +* 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 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..ac8bfad --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: spiral diff --git a/.gitignore b/.gitignore index a6959de..4d436be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea/ .env composer.lock -vendor/ +/runtime/ +/vendor/ *.db -clover.xml \ No newline at end of file +clover.xml diff --git a/composer.json b/composer.json index f01a24d..0a7ccfe 100644 --- a/composer.json +++ b/composer.json @@ -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": "wolfy.jd@gmail.com" + "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": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "email": "pavel.buchnev@spiralscout.com" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "email": "alexey.gagarin@spiralscout.com" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "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 - } - } } diff --git a/phpunit.xml b/phpunit.xml index f204021..fd89304 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,25 +1,33 @@ - - - src - - - - - ./tests/ - - + cacheResultFile="runtime/phpunit/result.cache" + failOnWarning="true" + failOnRisky="true" + executionOrder="random" + stderr="true" + beStrictAboutOutputDuringTests="true" +> + + + ./tests/ + + + + + + + + + + + + src + + + tests + + diff --git a/psalm.xml b/psalm.xml index 9dd5b27..607eb7b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,9 +1,11 @@ -