Skip to content

Commit 19dbcf7

Browse files
authored
Merge pull request #236 from stof/php_cs_fixer_setup
Use a dev dependency for php-cs-fixer
2 parents e09ab4f + dfb1580 commit 19dbcf7

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/static.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@ jobs:
55
name: PHP-CS-Fixer
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@master
9-
- name: PHP-CS-Fixer
10-
uses: docker://oskarstark/php-cs-fixer-ga
8+
- uses: actions/checkout@v4
9+
- name: "Install PHP"
10+
uses: "shivammathur/setup-php@v2"
1111
with:
12-
args: --dry-run
12+
coverage: "none"
13+
php-version: "8.3"
14+
15+
- name: "Install dependencies with Composer"
16+
uses: "ramsey/composer-install@v2"
17+
18+
- name: PHP-CS-Fixer
19+
run: vendor/bin/php-cs-fixer fix --dry-run
1320

1421
phpstan:
1522
runs-on: ubuntu-latest
1623
steps:
1724
- name: "Checkout code"
18-
uses: "actions/checkout@master"
25+
uses: "actions/checkout@v4"
1926

2027
- name: "Install PHP"
2128
uses: "shivammathur/setup-php@v2"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
vendor/
22
bin/phpunit
3+
.php-cs-fixer.cache
34
.phpunit.result.cache
45
composer.lock
56
bin/doctrine-dbal

.php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'@Symfony' => true,
1515
'array_syntax' => ['syntax' => 'short'],
1616
'no_superfluous_phpdoc_tags' => [
17-
'allow_mixed' => true, # PHPStan will complain about missing types otherwise
17+
'allow_mixed' => true, // PHPStan will complain about missing types otherwise
1818
],
1919
])
2020
->setFinder($finder)

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"require-dev": {
2727
"doctrine/common": "^2.9|^3.0",
2828
"doctrine/dbal": "^2.2|^3.0",
29+
"friendsofphp/php-cs-fixer": "^3.59",
2930
"php-amqplib/php-amqplib": "^2.9|^3.0",
3031
"phpspec/prophecy-phpunit": "^2.0",
3132
"phpstan/phpstan": "^1.2",

0 commit comments

Comments
 (0)