Skip to content

Commit

Permalink
Issue #249: Switch phpstan to include phpstan.neon.dist (#627)
Browse files Browse the repository at this point in the history
* Issue #249: Remove -c from the phpstan test

* Issue #249: Scaffold phpstan.neon.dist

* Issue #249: Update TestStatic.yml

* Issue #249: Update phpstan.neon.dist
  • Loading branch information
leonel-lullabot authored Aug 5, 2024
1 parent 315e595 commit cd5d5f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/TestStatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- name: Verify files were created
run: |
test -f phpcs.xml.dist
test -f phpstan.neon.dist
- name: Fix settings.php
run: |
Expand Down
3 changes: 2 additions & 1 deletion drainpipe-dev/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"[web-root]/sites/sites.php": "scaffold/nightwatch/sites.php",
"[project-root]/.ddev/docker-compose.selenium.yaml": "scaffold/nightwatch/docker-compose.selenium.yaml",
"[project-root]/test/nightwatch/example.nightwatch.js": "scaffold/nightwatch/example.nightwatch.js",
"[project-root]/phpcs.xml.dist": "scaffold/phpcs.xml.dist"
"[project-root]/phpcs.xml.dist": "scaffold/phpcs.xml.dist",
"[project-root]/phpstan.neon.dist": "scaffold/phpstan.neon.dist"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
includes:
- ../../../mglaman/phpstan-drupal/extension.neon
- ../../../phpstan/phpstan-deprecation-rules/rules.neon
- ./vendor/mglaman/phpstan-drupal/extension.neon
- ./vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
excludePaths:
Expand Down
8 changes: 2 additions & 6 deletions tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,11 @@ tasks:
- |
{{ .FUNC_ENSURE_DIRS }}
- |
CONFIG="phpstan.neon"
if [ ! -f phpstan.neon ]; then
CONFIG="vendor/lullabot/drainpipe/scaffold/phpstan.neon"
fi
if [ "{{.format}}" == "junit" ]; then
mkdir -p test_result
./vendor/bin/phpstan analyse --error-format=junit -c $CONFIG {{.TEST_DIRS}} > test_result/phpstan.xml
./vendor/bin/phpstan analyse --error-format=junit {{.TEST_DIRS}} > test_result/phpstan.xml
else
./vendor/bin/phpstan analyse -c $CONFIG {{.TEST_DIRS}}
./vendor/bin/phpstan analyse {{.TEST_DIRS}}
fi
phpunit:
desc: Runs PHPUnit
Expand Down

0 comments on commit cd5d5f6

Please sign in to comment.