From 7010ed3b78c2ee2c452b8cacfa569eb71b8ecb52 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 15 Apr 2024 13:00:24 +0200 Subject: [PATCH 1/2] Phpstan: Use separate workflow --- .github/workflows/php.yml | 12 ++++-------- .github/workflows/phpstan.yml | 10 ++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0494ddb..b9cf21c 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 @@ -41,10 +41,6 @@ jobs: if: ${{ ! cancelled() }} run: phpcs -wps --colors - - name: PHPStan - if: ${{ ! cancelled() }} - uses: php-actions/phpstan@v3 - test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -55,12 +51,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 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..a4430d9 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,10 @@ +name: PHPStan + +on: + pull_request: + branches: + - main + +jobs: + phpstan: + uses: icinga/github-actions/.github/workflows/phpstan.yml@main From e3a491c6e2f4a54b4716e4a02d3689c14696d7af Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 17 Apr 2024 13:45:45 +0200 Subject: [PATCH 2/2] phpstan: Scan `/usr/share/icinga-php` instead of `vendor` Because this is available both locally and remotely. --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index f58b54c..027e72a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,7 +12,7 @@ parameters: - src scanDirectories: - - vendor + - /usr/share/icinga-php universalObjectCratesClasses: # to ignore magic property errors - ipl\Sql\Config