Skip to content

Code Quality

Code Quality #217

Workflow file for this run

name: Code Quality
on:
push:
pull_request:
branches: [ 1.x ]
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PHP_VERSION: '8.3'
jobs:
composer:
runs-on: ubuntu-latest
name: Composer Validations
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
- name: Validate composer.json
run: composer validate --strict
- name: Check for PSR Violations
run: composer dump --optimize --strict-psr
php-cs-fixer:
runs-on: ubuntu-latest
name: Coding Standards
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
tools: php-cs-fixer, cs2pr
- name: PHP Coding Standards Fixer
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr
psalm:
runs-on: ubuntu-latest
name: Static Analysis (Psalm)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
tools: psalm
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
composer-options: '--prefer-dist'
- name: Run Psalm
run: psalm --long-progress --no-diff --output-format=github
phpstan:
runs-on: ubuntu-latest
name: Static Analysis (PHPStan)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
tools: phpstan
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
composer-options: '--prefer-dist'
- name: Run PHPStan
run: phpstan analyse --no-progress