| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
PHPStan finds bugs in your code without writing tests by using running static analysis on your project's code.
Create your Github Workflow configuration in .github/workflows/ci.yml or similar.
name: CI
on: [push]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6 # or alternative dependency management
- uses: php-actions/phpstan@v3
with:
path: src/
# ... then your own project steps ...This action is released with semantic version numbers, but also tagged so the latest major release's tag always points to the latest release within the matching major version.
Please feel free to use uses: php-actions/phpstan@v3 to always run the latest version of v3, or uses: php-actions/phpstan@v3.0.0 to specify the exact release.
We've put together an extremely simple example application that uses php-actions/phpstan. Check it out here: https://github.com/php-actions/example-phpstan.
The following configuration options are available:
By default, adding - uses: php-actions/phpstan@v2 into your workflow will run phpstan analyse, as analyse is the default command name.
You can issue custom commands by passing a command input, like so:
jobs:
phpstan:
...
- name: PHPStan
uses: php-actions/phpstan@v3
with:
command: your-command-hereThe syntax for passing in a custom input is the following:
...
jobs:
phpstan:
...
- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
configuration: custom/path/to/phpstan.neon
memory_limit: 256MIf you require other configurations of phpstan, please request them in the Github issue tracker
It's possible to run any version of PHPStan under any version of PHP, with any PHP extensions you require. This is configured with the following inputs:
If you require a specific version combination that is not compatible with Github Actions for some reason, please make a request in the Github issue tracker.
If you found this repository helpful, please consider sponsoring the developer.
| Back | FazBrowse Home | New Git URL |