Skip to content

Commit

Permalink
Update psalm configuration and workflow (#1287)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Jun 29, 2023
2 parents 4b6cff1 + c3dea2b commit 76c1e6e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug
coverage: pcov
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On

- name: Install dependencies
run: composer install
uses: ramsey/composer-install@v2

- name: Run Psalm
run: composer psalm
32 changes: 12 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3",
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^5.12"
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.13.1"
},
"conflict": {
"phpunit/phpunit": "<8.0"
Expand Down Expand Up @@ -71,30 +71,22 @@
"scripts": {
"check": [
"@composer validate",
"@test",
"@psalm:security",
"@psalm:dry-run"
],
"docs": "phpdoc -d library -t docs/api",
"phpunit": [
"@xdebug",
"vendor/bin/phpunit --colors=always --testdox --stop-on-failure"
"@test"
],
"docs": "vendor/bin/phpdoc -d library -t docs/api",
"phpunit": "vendor/bin/phpunit --colors=always --testdox --stop-on-failure",
"psalm": [
"@xdebug",
"@psalm:shepherd"
"@psalm:shepherd",
"@psalm:security",
"@psalm:dry-run"
],
"psalm:baseline": "vendor/bin/psalm --set-baseline=psalm-baseline.xml",
"psalm:dry-run": "vendor/bin/psalm --alter --issues=all --dry-run",
"psalm:missing": "vendor/bin/psalm --alter --issues=MissingReturnType",
"psalm:security": "vendor/bin/psalm --taint-analysis",
"psalm:shepherd": "vendor/bin/psalm --shepherd --show-info=false --stats --no-diff --no-cache",
"psalm:baseline": "vendor/bin/psalm --no-diff --no-cache --set-baseline=psalm-baseline.xml",
"psalm:dry-run": "vendor/bin/psalm --no-cache --alter --issues=all --dry-run",
"psalm:security": "vendor/bin/psalm --no-diff --no-cache --taint-analysis",
"psalm:shepherd": "vendor/bin/psalm --no-diff --no-cache --shepherd --stats --output-format=github",
"test": [
"@phpunit",
"@psalm"
],
"xdebug": [
"@putenv XDEBUG_MODE=coverage"
]
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.12.0@f90118cdeacd0088e7215e64c0c99ceca819e176">
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
<file src="library/Mockery.php">
<ArgumentTypeCoercion>
<code>$expectation</code>
Expand Down

0 comments on commit 76c1e6e

Please sign in to comment.