Skip to content

Commit

Permalink
[CI] Added phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Dec 17, 2024
1 parent b5d0b32 commit a391bf1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

- name: Run PHPStan analysis
run: composer run-script phpstan

tests:
name: Unit tests
runs-on: "ubuntu-20.04"
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,26 @@
"ibexa/http-cache": "~4.6.0@dev",
"phpspec/phpspec": "^7.1",
"ibexa/code-style": "^1.0",
"friendsofphp/php-cs-fixer": "^3.0"
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0"
},
"scripts": {
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots",
"check-cs": "@fix-cs --dry-run",
"test": "phpspec run --format=pretty"
"test": "phpspec run --format=pretty",
"phpstan": "phpstan analyse"
},
"extra": {
"branch-alias": {
"dev-main": "4.6.x-dev"
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true
"php-http/discovery": false
}
}
}
Empty file added phpstan-baseline.neon
Empty file.
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon

parameters:
level: 8
paths:
- src
- tests

0 comments on commit a391bf1

Please sign in to comment.