Skip to content

Commit 1738a10

Browse files
committed
build: switch to Laravel Pint
1 parent 95a489b commit 1738a10

File tree

5 files changed

+34
-48
lines changed

5 files changed

+34
-48
lines changed

.github/workflows/codestyle.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
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/[email protected]
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v5
27+
with:
28+
commit_message: "styling: fix styling"

.gitignore

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 25 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"psr/http-message": "^1.0|^2.0"
1616
},
1717
"require-dev": {
18-
"friendsofphp/php-cs-fixer": "^3.0",
1918
"guzzlehttp/guzzle": "^7.3",
20-
"phpunit/phpunit": "^9.5",
21-
"php-http/mock-client": "^1.2"
19+
"laravel/pint": "^1.21",
20+
"php-http/mock-client": "^1.2",
21+
"phpunit/phpunit": "^9.5"
2222
},
2323
"suggest": {
2424
"swisnl/php-http-fixture-client": "Allows for easily mocking API calls with fixtures in your tests"
@@ -53,8 +53,8 @@
5353
],
5454
"scripts": {
5555
"test": "phpunit",
56-
"check-style": "php-cs-fixer fix --dry-run -v",
57-
"fix-style": "php-cs-fixer fix"
56+
"check-style": "pint --test",
57+
"fix-style": "pint"
5858
},
5959
"extra": {
6060
"branch-alias": {
@@ -64,6 +64,7 @@
6464
"minimum-stability": "dev",
6565
"prefer-stable": true,
6666
"config": {
67+
"sort-packages": true,
6768
"allow-plugins": {
6869
"php-http/discovery": true
6970
}

0 commit comments

Comments
 (0)