Skip to content

Commit

Permalink
Phpstan: Streamline vendor file location with local dev-env (#2838)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 authored Dec 4, 2023
2 parents aa31b37 + 4edf4b4 commit 12cca3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 10 additions & 9 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', '8.2']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
os: ['ubuntu-latest']

steps:
Expand All @@ -32,15 +32,16 @@ jobs:

- name: Setup dependencies
run: |
composer require -n --no-progress overtrue/phplint phpunit/phpunit ipl/stdlib:@dev ipl/html:@dev
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-thirdparty.git vendor/icinga-php-thirdparty
git clone --depth 1 https://github.com/Icinga/icingaweb2-module-cube.git vendor/cube
composer require -n --no-progress overtrue/phplint phpunit/phpunit phpstan/phpstan
sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2
sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git /usr/share/icinga-php/vendor
sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git /usr/share/icinga-php/ipl
sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-cube.git /usr/share/icingaweb2-modules/cube
- name: Setup Incubator
run: |
git clone --depth 1 https://github.com/Icinga/icingaweb2-module-incubator vendor/incubator
cd vendor/incubator
sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-incubator /usr/share/icingaweb2-modules/incubator
cd /usr/share/icingaweb2-modules/incubator
composer require --no-update \
"gipfl/calendar": "dev-master as 99.x-dev" \
"gipfl/cli": "dev-master as 99.x-dev" \
Expand Down Expand Up @@ -82,7 +83,7 @@ jobs:

- name: PHPStan
if: ${{ ! cancelled() }}
uses: php-actions/phpstan@v3
run: ./vendor/bin/phpstan analyse

test:
name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }}
Expand All @@ -94,7 +95,7 @@ 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']
include:
- php: '7.2'
Expand Down
7 changes: 5 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ parameters:
- '#. but return statement is missing#'

scanDirectories:
- vendor
- library/Director/Test
- /icingaweb2
- /usr/share/icinga-php
- /usr/share/icingaweb2-modules/incubator
- /usr/share/icingaweb2-modules/cube

excludePaths:
- library/Director/CoreBeta

Expand Down

0 comments on commit 12cca3e

Please sign in to comment.