File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,12 @@ jobs:
8080 php_files=($(find "${{ inputs.working-directory }}" -mindepth 1 -maxdepth 1 \
8181 -type f -name '*.php'))
8282
83- # TBD
83+ # Surprisingly, PHPStan does not seem to find composer.json when using a custom working directory.
84+ # Therefore, we will simply pass the Composer autoloader explicitly.
8485 composer_vendor="$(composer -d ${{ inputs.working-directory }} config vendor-dir)"
8586 autoload_file="${{ inputs.working-directory }}/${composer_vendor}/autoload.php"
8687
87- args=(-a "${autoload_file}" "${dirs[@]}" "${php_files[@]}")
88+ args=(--level 6 - a "${autoload_file}" "${dirs[@]}" "${php_files[@]}")
8889 fi
8990
9091 log_cmd phpstan analyse "${args[@]}"
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function usage(): void
7676 exit (1 );
7777}
7878
79- foreach ((array ) $ config ['parameters ' ]['scanDirectories ' ] ?? [] as $ existing ) {
79+ foreach ((array ) ( $ config ['parameters ' ]['scanDirectories ' ] ?? []) as $ existing ) {
8080 if (is_dir ($ existing ) && is_readable ($ existing )) {
8181 $ scanDirs [] = $ existing ;
8282 $ diff [] = "$ existing (unchanged) " ;
You can’t perform that action at this time.
0 commit comments