From 8fc4e7527afeea31b415ce624954f7252109a151 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 15 Apr 2024 10:05:09 +0200 Subject: [PATCH 1/2] Phpstan: Separate workflow --- .github/workflows/php.yml | 14 +++----------- .github/workflows/phpstan.yml | 15 +++++++++++++++ phpstan.neon | 3 ++- 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 3d4e99e..f1c7c66 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,12 +17,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] os: ['ubuntu-latest'] steps: - name: Checkout code base - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -31,11 +31,7 @@ jobs: tools: phpcs - name: Setup dependencies - 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 + run: composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} @@ -44,7 +40,3 @@ jobs: - name: PHP CodeSniffer if: ${{ ! cancelled() }} run: phpcs - - - name: PHPStan - if: ${{ ! cancelled() }} - uses: php-actions/phpstan@v3 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..b4cae62 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,15 @@ +name: PHPStan + +on: + pull_request: + branches: + - master + +jobs: + phpstan: + uses: icinga/github-actions/.github/workflows/phpstan.yml@main + with: + dependencies: | + { + "/icingaweb2" : "https://github.com/Icinga/icingaweb2.git" + } diff --git a/phpstan.neon b/phpstan.neon index 54826ac..4b14954 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -20,7 +20,8 @@ parameters: reportUnmatched: false scanDirectories: - - vendor + - /icingaweb2 + - /usr/share/icinga-php universalObjectCratesClasses: - Icinga\Web\View From e21a7e50ee0123df10224763104c65a53fc15d88 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 15 Apr 2024 11:41:31 +0200 Subject: [PATCH 2/2] Update phpstan baseline --- phpstan-baseline.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6dbadd6..391545a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -47,7 +47,7 @@ parameters: - message: "#^Cannot access offset 'error' on mixed\\.$#" - count: 3 + count: 1 path: library/Pdfexport/HeadlessChrome.php -