Skip to content
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
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ cypress.json
docker-compose.ci.yml
CONTRIBUTING.md
artifacts
phpstan.neon
phpstan-baseline.neon
17 changes: 17 additions & 0 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,20 @@ jobs:
composer install --prefer-dist --no-progress --no-dev
- name: Run phpunit
run: phpunit

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: simplexml
- name: Checkout source code
uses: actions/checkout@v4
- name: Install composer
run: |
composer install --prefer-dist --no-progress
- name: Run phpstan
run: composer run phpstan
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
},
"scripts": {
"format": "phpcbf --standard=phpcs.xml --report-summary --report-source",
"lint": "phpcs --standard=phpcs.xml"
"lint": "phpcs --standard=phpcs.xml",
"phpstan": "phpstan",
"phpstan:generate:baseline": "phpstan --generate-baseline"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -48,6 +50,8 @@
"require-dev": {
"wp-coding-standards/wpcs": "^2.3",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"phpcompatibility/phpcompatibility-wp": "*"
"phpcompatibility/phpcompatibility-wp": "*",
"phpstan/phpstan": "^2.1",
"szepeviktor/phpstan-wordpress": "^2.0"
}
}
181 changes: 176 additions & 5 deletions composer.lock

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

Loading
Loading