Skip to content

Commit 1d1838c

Browse files
committed
build: switch to Laravel Pint
1 parent 830e8ca commit 1d1838c

File tree

5 files changed

+32
-47
lines changed

5 files changed

+32
-47
lines changed

.github/workflows/codestyle.yml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
php-code-styling:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
22+
- name: Fix PHP code style issues
23+
uses: aglipanci/laravel-pint-action@2.5
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v5
27+
with:
28+
commit_message: "styling: fix styling"

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ composer.phar
22
composer.lock
33
/vendor/
44
/.idea/
5-
/.php-cs-fixer.php
6-
/.php-cs-fixer.cache
75
/.phpunit.result.cache
86
/.phpunit.cache/test-results

.php-cs-fixer.dist.php

-26
This file was deleted.

composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"swisnl/json-api-client": "^2.0"
99
},
1010
"require-dev": {
11-
"friendsofphp/php-cs-fixer": "^3.0",
1211
"guzzlehttp/guzzle": "^7.3",
1312
"guzzlehttp/psr7": "^2.1",
13+
"laravel/pint": "^1.5",
1414
"orchestra/testbench": "^6.15|^7.0|^8.0|^9.0|^10.0",
1515
"phpunit/phpunit": "^9.5|^10.5|^11.5.3"
1616
},
@@ -36,8 +36,8 @@
3636
],
3737
"scripts": {
3838
"test": "phpunit",
39-
"check-style": "php-cs-fixer fix --dry-run -v",
40-
"fix-style": "php-cs-fixer fix"
39+
"check-style": "pint --test",
40+
"fix-style": "pint"
4141
},
4242
"extra": {
4343
"branch-alias": {
@@ -59,6 +59,7 @@
5959
"minimum-stability": "dev",
6060
"prefer-stable": true,
6161
"config": {
62+
"sort-packages": true,
6263
"allow-plugins": {
6364
"php-http/discovery": true
6465
}

0 commit comments

Comments
 (0)