Skip to content

chore(dev): run phpstan with 8.4 #1616

chore(dev): run phpstan with 8.4

chore(dev): run phpstan with 8.4 #1616

Workflow file for this run

name: Code Analysis
on:
pull_request:
push:
schedule:
# Run Monday morning at 3 o'clock
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: 0 3 * * 1
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
env:
COMPOSER_NO_INTERACTION: 1
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none
# Remove unnecessary dependencies not needed in this context
- run: composer remove --dev friendsofphp/php-cs-fixer --no-update
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- run: composer update --prefer-dist --no-progress
- run: composer phpstan -- --no-progress --error-format=table
code-style-checker:
name: Code Style checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- run: composer update --prefer-dist --no-progress
- run: composer lint