Skip to content

Match php-cs-fixer version between local check and CI #128

Match php-cs-fixer version between local check and CI

Match php-cs-fixer version between local check and CI #128

Workflow file for this run

name: Check & fix styling
on: [push]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: php-cs-fixer:3.54.x, cs2pr
- name: Restore PHP-CS-Fixer cache
uses: actions/cache@v4
with:
path: .php_cs.cache
key: "php-cs-fixer"
restore-keys: "php-cs-fixer"
- name: Run PHP-CS-Fixer with output for CI debugging
run: php-cs-fixer fix -vv --dry-run --allow-risky=yes
- name: Run PHP-CS-Fixer with automatic pull request comments
run: php-cs-fixer fix --dry-run --format=checkstyle --allow-risky=yes | cs2pr