Skip to content

Commit

Permalink
Added phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Dec 20, 2024
1 parent 052bcc7 commit 6b61ffc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
- name: Run test suite
run: composer run-script --timeout=600 test

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

integration-tests:
name: Integration yests
needs: tests
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
"ibexa/design-engine": "~4.6.0@dev",
"ibexa/user": "~4.6.0@dev",
"ibexa/fieldtype-richtext": "~4.6.0@dev",
"ibexa/phpstan": "~4.6.0@dev",
"ibexa/rest": "~4.6.0@dev",
"ibexa/search": "~4.6.0@dev",
"ibexa/test-core": "~4.6.0@dev",
"ibexa/http-cache": "~4.6.0@dev",
"ibexa/notifications": "^4.6.x-dev",
"phpunit/phpunit": "^8.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.0"
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0"
},
"autoload": {
"psr-4": {
Expand All @@ -55,7 +59,8 @@
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots",
"check-cs": "@fix-cs --dry-run",
"test": "phpunit -c phpunit.xml",
"test-integration": "phpunit -c phpunit.integration.xml"
"test-integration": "phpunit -c phpunit.integration.xml",
"phpstan": "phpstan analyse"
},
"config": {
"allow-plugins": false
Expand Down
Empty file added phpstan-baseline.neon
Empty file.
12 changes: 12 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/ibexa/phpstan/extension.neon

parameters:
level: 8
paths:
- src
- tests
treatPhpDocTypesAsCertain: false

0 comments on commit 6b61ffc

Please sign in to comment.