Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan setup: various tweaks #71

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
paths-ignore:
- '**.md'
- '**.xml'
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
Expand All @@ -18,7 +19,7 @@ concurrency:

jobs:
phpstan:
name: "PHP: 7.4 | PHPStan"
name: "PHPStan"

runs-on: "ubuntu-latest"

Expand All @@ -43,4 +44,4 @@ jobs:
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Run PHPStan
run: phpstan analyse --configuration=phpstan.neon
run: phpstan analyse
3 changes: 2 additions & 1 deletion phpstan.neon → phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
parameters:
phpVersion: 70100 # Should be 50400, but PHPStan only accepts 70100 or higher...
level: 0
paths:
- src
Expand All @@ -8,7 +9,7 @@ parameters:
-
count: 1
message: '~^Undefined variable: \$phpCodeSnifferConfig$~'
path: %currentWorkingDirectory%/src/Config.php
path: src/Config.php

dynamicConstantNames:
- PHP_CODESNIFFER_IN_TESTS
Expand Down