Output Sample #1 (comment)
- add dependecy in composer.json
"rozeo/phpstan-github-actions": "^1.0.0"
- put
phpstan.neon
setting file on repository root.
touch phpstan.neon
- setting phpstan and add phpstan custom formatter. ex.)
parameters:
level: 5
paths:
- src
services:
errorFormatter.markdown:
class: Rozeo\PHPStanAction\PHPStanMarkdownFormatter
- add rules on workflow file(based php workflow).
on:
pull_request:
branches:
- branch
~~~
- name: composer install
run: composer install
- name: running phpstan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: ./vendor/bin/phpstan-github-actions