Skip to content

Update PHPStan packages #437

Update PHPStan packages

Update PHPStan packages #437

name: Static Analysis
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
static-analysis:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
name: "PHPStan"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: 8.1
extensions: mbstring, xml, ctype, iconv, intl, json
ini-values: "memory_limit=-1"
tools: flex,pecl,cs2pr
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
- name: "Install phpstan tool with Composer"
uses: "ramsey/composer-install@v2"
with:
working-directory: "tools/phpstan"
- name: "Install php-cs-fixer tool with Composer"
uses: "ramsey/composer-install@v2"
with:
working-directory: "tools/php-cs-fixer"
- name: "Run a static analysis with phpstan/phpstan"
run: "php tools/phpstan/vendor/bin/phpstan analyse --error-format=github"
- name: "Run PHP-CS-Fixer"
run: "php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff"