Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist

- name: Coding Standard Checks
if: ${{ matrix.php-versions == '8.0' }}
run: PHP_CS_FIXER_IGNORE_ENV=1 ./bin/php-cs-fixer fix --dry-run --diff

- name: Static Analysis
if: ${{ matrix.php-versions == '8.0' }}
run: ./bin/psalm.phar --no-cache
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PHP CS Fixer

on:
pull_request:

permissions:
contents: write

jobs:
cs-fixer:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer:v2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cache Composer packages
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-cs-fixer-

- name: Install dependencies
run: composer install --prefer-dist

- name: Run PHP CS Fixer
run: ./bin/php-cs-fixer fix --diff

- name: Commit CS Fixer fixes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: apply php-cs-fixer changes"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"