Skip to content

Commit

Permalink
Merge pull request #1 from vfunin/feat/add-php-stan
Browse files Browse the repository at this point in the history
PHPStan support
  • Loading branch information
vfunin committed Aug 14, 2023
2 parents 5c1f78a + e5c2c49 commit 9b7ddfc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ cs:
psalm:
docker compose run --rm application composer dck-psalm

phpstan:
docker compose run --rm application composer dck-phpstan

gst:
docker compose run --rm application git status

Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"pestphp/pest": "^2.8",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpro/grumphp": "^1.16",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^10.2",
"psalm/plugin-laravel": "^2.8",
"psalm/plugin-mockery": "^1.1",
Expand Down Expand Up @@ -66,6 +67,7 @@
"dck-pest": "vendor/bin/pest --coverage",
"dck-pest-coverage": "vendor/bin/pest --coverage-xml=var/.report/coverage/xml --log-junit=var/.report/coverage/phpunit.junit.xml",
"dck-phpcs": "vendor/bin/phpcs",
"dck-phpstan": "vendor/bin/phpstan",
"dck-psalm": "vendor/bin/psalm",
"dck-rector": "vendor/bin/rector process --dry-run"
}
Expand Down
13 changes: 7 additions & 6 deletions composer.lock

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

4 changes: 4 additions & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ grumphp:
- phplint
- file_size
- phpcs
- phpstan
- psalm
- git_blacklist
- rector
Expand Down Expand Up @@ -145,6 +146,9 @@ grumphp:
standard: [ 'phpcs.xml' ]
ignore_patterns:
- var/
phpstan:
ignore_patterns:
- tests/
psalm:
config: psalm.xml
ignore_patterns:
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: max
paths:
- src
- app
1 change: 1 addition & 0 deletions src/Composer/DevCIKitPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function copyFiles(Event $event, ?Filesystem $filesystem = null): void
'rector.php',
'deptrac.yaml',
'.editorconfig',
'phpstan.neon',
'var/.cache/deptrac/.gitignore',
'var/.cache/infection/.gitignore',
'var/.cache/phpcs/.gitignore',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Composer/DevCIKitPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'phpcs.xml',
'phpunit.xml',
'psalm.xml',
'phpstan.neon',
'rector.php',
'deptrac.yaml',
'.editorconfig',
Expand Down

0 comments on commit 9b7ddfc

Please sign in to comment.