Skip to content

Commit

Permalink
Github Actions: Add PhpStan
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Aug 23, 2023
1 parent b836b1c commit f4592e6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
os: ['ubuntu-latest']

steps:
Expand All @@ -39,7 +39,11 @@ jobs:
run: rm composer.* && mv vendor real-vendor

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
run: |
composer require -n --no-progress overtrue/phplint
git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
git clone --depth 1 --b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
git clone --depth 1 --b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty
- name: PHP Lint
if: success() || matrix.allow_failure
Expand All @@ -48,3 +52,7 @@ jobs:
- name: PHP CodeSniffer
if: success() || matrix.allow_failure
run: phpcs

- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure
16 changes: 16 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
parameters:
level: 2

checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true

paths:
- application
- library

scanDirectories:
- /vendor
- vendor

universalObjectCratesClasses:
- Icinga\Web\View

0 comments on commit f4592e6

Please sign in to comment.