From 8f16d6ba3df1d7291b83f75710af1c7bdddef326 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Tue, 10 Oct 2023 10:30:22 +0200 Subject: [PATCH] ci: reactivate psalm (#459) --- .github/workflows/static.yml | 56 ++++++++++++++++++------------------ composer.json | 1 + psalm.xml | 50 +++----------------------------- 3 files changed, 33 insertions(+), 74 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 7e86d01a..5a7064d0 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -5,39 +5,39 @@ on: types: [opened, synchronize, reopened] jobs: -# psalm: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# php-version: ['8.1'] + psalm: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['8.2'] -# steps: -# - name: Checkout sources -# uses: actions/checkout@v4 + steps: + - name: Checkout sources + uses: actions/checkout@v4 -# - name: Setup PHP ${{ matrix.php-version }} -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php-version }} + - name: Setup PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} -# - name: Get Composer Cache Directory -# id: composer-cache -# run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT -# - name: Cache composer files -# uses: actions/cache@v3 -# with: -# path: ${{ steps.composer-cache.outputs.dir }} -# key: ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }} -# restore-keys: | -# ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }} -# ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }} -# ${{ runner.os }}-composer-v4- + - name: Get Composer Cache Directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - name: Cache composer files + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }} + restore-keys: | + ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }} + ${{ runner.os }}-composer-v4- -# - name: Install dependencies -# run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader + - name: Install dependencies + run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader -# - name: Run psalm -# run: vendor/bin/psalm --output-format=github + - name: Run psalm + run: vendor/bin/psalm --output-format=github phpstan: diff --git a/composer.json b/composer.json index eac3bb0d..ca7da1f2 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5 || ^10.0", + "psalm/plugin-laravel": "^2.8", "xheaven/composer-git-hooks": "^3.1" }, "suggest": { diff --git a/psalm.xml b/psalm.xml index 8255ea4d..c8b6116a 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,11 +1,14 @@ + @@ -14,49 +17,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -