Skip to content

Commit 51448d1

Browse files
authored
Upgrade php-cs-fixer dependency (#576)
1 parent e6b22bb commit 51448d1

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/workflows/cs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: '7.4'
21+
php-version: '8.1'
2222

2323
- name: Install dependencies
2424
run: composer update --no-progress --no-interaction --prefer-dist

.gitignore

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
*.lock
2-
package.xml
3-
/vendor
1+
# IDE
42
.idea
5-
.php_cs.cache
6-
docs/_build
3+
4+
# Composer
5+
/vendor
6+
composer.lock
7+
8+
# phpunit/phpunit
79
.phpunit.result.cache
10+
11+
# friendsofphp/php-cs-fixer
12+
/.php_cs.cache
13+
/.php-cs-fixer.cache

.php_cs renamed to .php-cs-fixer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
->in(__DIR__ . '/src')
55
;
66

7-
return PhpCsFixer\Config::create()
7+
$config = new PhpCsFixer\Config;
8+
9+
$config
810
->setRules([
911
'@PSR2' => true,
1012
])
1113
->setFinder($finder)
1214
;
15+
16+
return $config;

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"phpunit/phpunit": "^5.7 | ^6.5 | ^7.5 | ^8.4 | ^9.3",
3838
"laravel/framework": "5.0 - 5.8 | ^6.0 | ^7.0 | ^8.0 | ^9.0",
3939
"orchestra/testbench": "3.1 - 3.8 | ^4.7 | ^5.1 | ^6.0 | ^7.0",
40-
"friendsofphp/php-cs-fixer": "2.18.*",
40+
"friendsofphp/php-cs-fixer": "^3.11",
4141
"mockery/mockery": "^1.3"
4242
},
4343
"autoload-dev": {
@@ -56,7 +56,7 @@
5656
"XDEBUG_MODE=coverage vendor/bin/phpunit --verbose --configuration phpunit.xml --coverage-html test/html-report"
5757
],
5858
"phpcs": [
59-
"vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --diff --dry-run"
59+
"vendor/bin/php-cs-fixer fix --verbose --diff --dry-run"
6060
]
6161
},
6262
"extra": {

0 commit comments

Comments
 (0)