Skip to content

Commit 42253a3

Browse files
authored
Fix deprecations for cs fixer (#46)
1 parent bac0273 commit 42253a3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?php
22

3+
use PhpCsFixer\Config;
4+
35
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
46

57
$rules = [
68
'@Symfony' => true,
79
'new_with_braces' => true,
8-
'phpdoc_inline_tag' => false,
910
'concat_space' => ['spacing' => 'one'],
1011
'array_syntax' => ['syntax' => 'short'],
1112
'yoda_style' => false,
@@ -31,4 +32,4 @@
3132
'strict_comparison' => true,
3233
];
3334

34-
return PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder);
35+
return (new Config())->setRules($rules)->setFinder($finder);

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"scripts": {
3535
"test": "vendor/bin/phpunit --configuration phpunit.xml.dist",
3636
"coverage": "vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html=tests/coverage",
37-
"fixer": "vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --allow-risky=yes",
37+
"fixer": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --allow-risky=yes",
3838
"linter": [
39-
"vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --allow-risky=yes",
39+
"vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --allow-risky=yes",
4040
"vendor/bin/phpcpd ./ --exclude vendor --exclude tests --exclude src/Entity --exclude src/Serializer",
4141
"vendor/bin/psalm --show-info=true"
4242
],

0 commit comments

Comments
 (0)