You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+45-21
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,36 @@ jobs:
21
21
22
22
steps:
23
23
- uses: actions/checkout@v2
24
-
- uses: php-actions/composer@v2# or alternative dependency management
25
-
- uses: php-actions/phpstan@v1
24
+
- uses: php-actions/composer@v5# or alternative dependency management
25
+
- uses: php-actions/phpstan@v2
26
26
# ... then your own project steps ...
27
27
```
28
28
29
-
Commands
30
-
--------
29
+
Example
30
+
-------
31
31
32
-
By default, adding - uses: php-actions/phpstan@v1 into your workflow will run `phpstan analyse`, as `analyse` is the default command name.
32
+
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.
33
+
34
+
Inputs
35
+
------
36
+
37
+
The following configuration options are available:
38
+
39
+
+`version` The version of PHPUnit to use e.g. `9` or `9.5.0` (default: latest)
40
+
+`php_version` The version of PHP to use e.g. `7.4` (default: latest)
41
+
+`php_extensions` Space-separated list of extensions using [php-build][php-build] e.g. `xdebug mbstring` (default: N/A)
42
+
+`command` The command to run e.g. `list` or `worker` (default: analyse)
43
+
+`path` Path(s) with source code to run analysis on (required)
44
+
+`configuration` Configuration file location
45
+
+`level` Level of rule options - the higher, the stricter
46
+
+`paths_file` Path to a file with a list of paths to run analysis on
+ `error_format` Format in which to print the result of the analysis
58
-
+ `generate_baseline` Path to a file where the baseline should be saved
59
-
+ `memory_limit` Memory limit for analysis
60
-
61
69
The syntax for passing in a custom input is the following:
62
70
63
71
```yaml
@@ -69,14 +77,30 @@ jobs:
69
77
...
70
78
71
79
- name: PHPStan Static Analysis
72
-
uses: php-actions/phpstan@v1
80
+
uses: php-actions/phpstan@v2
73
81
with:
74
82
configuration: custom/path/to/phpstan.neon
75
83
memory_limit: 256M
76
84
```
77
85
78
86
If you require other configurations of phpstan, please request them in the [Github issue tracker](https://github.com/php-actions/phpstan/issues)
79
87
88
+
PHP and PHPStan versions
89
+
------------------------
90
+
91
+
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:
92
+
93
+
+ `version` - the version number of PHPStan to run e.g. `0.12.63` (default: latest)
94
+
+ `php_version` - the version number of PHP to use e.g. `7.4` (default: latest)
95
+
+ `php_extensions` - a space-separated list of extensions to install using [php-build][php-build] e.g. `xdebug mbstring` (default: N/A)
96
+
97
+
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][issues].
98
+
99
+
100
+
***
101
+
80
102
If you found this repository helpful, please consider [sponsoring the developer][sponsor].
0 commit comments