diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 34697de..e19c470 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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: @@ -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 @@ -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 diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..0916fbc --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,16 @@ +parameters: + level: 2 + + checkFunctionNameCase: true + checkInternalClassCaseSensitivity: true + + paths: + - application + - library + + scanDirectories: + - /vendor + - vendor + + universalObjectCratesClasses: + - Icinga\Web\View