File tree Expand file tree Collapse file tree 4 files changed +60
-34
lines changed Expand file tree Collapse file tree 4 files changed +60
-34
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : " Static Analysis with PHPStan"
3
+
4
+ on :
5
+ workflow_call :
6
+ inputs :
7
+ php-version :
8
+ description : " The PHP version to use when running the job"
9
+ default : " 8.3"
10
+ required : false
11
+ type : " string"
12
+ composer-root-version :
13
+ description : " The version of the package being tested, in case of circular dependencies."
14
+ required : false
15
+ type : " string"
16
+ composer-options :
17
+ description : " Additional flags for the composer install command."
18
+ default : " --prefer-dist"
19
+ required : false
20
+ type : " string"
21
+
22
+ jobs :
23
+ phpstan :
24
+ name : " PHPStan (PHP: ${{ inputs.php-version }})"
25
+ runs-on : " ubuntu-22.04"
26
+
27
+ steps :
28
+ - name : " Checkout code"
29
+ uses : " actions/checkout@v4"
30
+
31
+ - name : " Install PHP"
32
+ uses : " shivammathur/setup-php@v2"
33
+ with :
34
+ coverage : " none"
35
+ php-version : " ${{ inputs.php-version }}"
36
+
37
+ - name : " Set COMPOSER_ROOT_VERSION"
38
+ run : |
39
+ echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
40
+ if : " ${{ inputs.composer-root-version }}"
41
+
42
+ - name : " Install dependencies with Composer"
43
+ uses : " ramsey/composer-install@v3"
44
+ with :
45
+ dependency-versions : " highest"
46
+ composer-options : " ${{ inputs.composer-options }}"
47
+
48
+ - name : " Run a static analysis with phpstan/phpstan"
49
+ run : " vendor/bin/phpstan analyse -v"
Original file line number Diff line number Diff line change 21
21
22
22
jobs :
23
23
phpstan :
24
- name : " PHPStan (PHP: ${{ inputs.php-version }})"
25
- runs-on : " ubuntu-22.04"
26
-
27
- steps :
28
- - name : " Checkout code"
29
- uses : " actions/checkout@v4"
30
-
31
- - name : " Install PHP"
32
- uses : " shivammathur/setup-php@v2"
33
- with :
34
- coverage : " none"
35
- php-version : " ${{ inputs.php-version }}"
36
-
37
- - name : " Set COMPOSER_ROOT_VERSION"
38
- run : |
39
- echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
40
- if : " ${{ inputs.composer-root-version }}"
41
-
42
- - name : " Install dependencies with Composer"
43
- uses : " ramsey/composer-install@v3"
44
- with :
45
- dependency-versions : " highest"
46
- composer-options : " ${{ inputs.composer-options }}"
47
-
48
- - name : " Run a static analysis with phpstan/phpstan"
49
- run : " vendor/bin/phpstan analyse -v"
24
+ name : " PHPStan (deprecated in favor of phpstan.yml)"
25
+ uses : " ./.github/workflows/phpstan.yml"
26
+ with :
27
+ php-version : " ${{ inputs.php-version }}"
28
+ composer-root-version : " ${{ inputs.composer-root-version }}"
29
+ composer-options : " ${{ inputs.composer-options }}"
50
30
51
31
psalm :
52
- name : " Psalm (PHP: ${{ inputs.php-version }})"
32
+ name : " Psalm (PHP: ${{ inputs.php-version }}, deprecated without a replacement )"
53
33
runs-on : " ubuntu-22.04"
54
34
55
35
steps :
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " Static analysis" ,
2
+ "name" : " Static analysis with PHPStan " ,
3
3
"description" : " Perform static analysis on the source code and tests" ,
4
4
"iconName" : " doctrine-logo" ,
5
5
"categories" : [
6
6
" PHP"
7
7
],
8
8
"filePatterns" : [
9
- " ^phpstan\\ .neon(?:\\ .dist)$" ,
10
- " ^psalm\\ .xml$"
9
+ " ^phpstan\\ .neon(?:\\ .dist)$"
11
10
]
12
11
}
Original file line number Diff line number Diff line change 6
6
branches :
7
7
- " *.x"
8
8
paths :
9
- - " .github/workflows/static-analysis .yml"
9
+ - " .github/workflows/phpstan .yml"
10
10
- " composer.*"
11
11
- " src/**"
12
12
- " phpstan*"
13
- - " psalm*"
14
13
- " tests/**"
15
14
push :
16
15
branches :
17
16
- " *.x"
18
17
paths :
19
- - " .github/workflows/static-analysis .yml"
18
+ - " .github/workflows/phpstan .yml"
20
19
- " composer.*"
21
20
- " src/**"
22
21
- " phpstan*"
23
- - " psalm*"
24
22
- " tests/**"
25
23
26
24
jobs :
You can’t perform that action at this time.
0 commit comments