phpstan fixes

This commit is contained in:
Robin Appelman 2025-10-25 21:43:15 +02:00
commit 5d37f6813d
10 changed files with 24 additions and 86 deletions

View file

@ -10,21 +10,17 @@ on:
name: CI
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
checks:
name: Nix checks
runs-on: nix
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: https://github.com/shivammathur/setup-php@v2
- uses: https://codeberg.org/icewind/attic-action@v1
with:
php-version: "8.2"
extensions: apcu
- name: Composer
run: composer install
- name: PHP-CS-Fixer
run: |
composer run cs:check
name: link
instance: https://cache.icewind.link
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix flake check --keep-going
php-versions:
runs-on: ubuntu-22.04
@ -201,61 +197,3 @@ jobs:
--coverage-clover=coverage.xml
env:
BACKEND: smbclient
static-psalm-analysis:
runs-on: ubuntu-latest
name: Psalm static analysis - PHP ${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
steps:
- name: krb5-dev
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y libkrb5-dev libsmbclient-dev
- name: Checkout
uses: actions/checkout@v4
- name: Set up php
uses: https://github.com/shivammathur/setup-php@master
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
coverage: none
extensions: apcu, smbclient, krb5
env:
fail-fast: true
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run psalm
phpstan:
name: PHPStan Static Analysis
runs-on: ubuntu-latest
steps:
- name: krb5-dev
run: |
sudo apt-get update
sudo apt-get install -y libkrb5-dev
- uses: actions/checkout@v4
- name: Setup PHP
uses: https://github.com/shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: apcu, smbclient, krb5
env:
fail-fast: true
- name: Composer
run: composer install
- env:
BACKEND: smbclient
run: php ./vendor/bin/phpstan analyse --level 6 src