Skip to content

Commit

Permalink
Fix deprecations for cs fixer (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin255 authored May 10, 2021
1 parent bac0273 commit 42253a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

use PhpCsFixer\Config;

$finder = PhpCsFixer\Finder::create()->in(__DIR__);

$rules = [
'@Symfony' => true,
'new_with_braces' => true,
'phpdoc_inline_tag' => false,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
Expand All @@ -31,4 +32,4 @@
'strict_comparison' => true,
];

return PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder);
return (new Config())->setRules($rules)->setFinder($finder);
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"scripts": {
"test": "vendor/bin/phpunit --configuration phpunit.xml.dist",
"coverage": "vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html=tests/coverage",
"fixer": "vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --allow-risky=yes",
"fixer": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --allow-risky=yes",
"linter": [
"vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --allow-risky=yes",
"vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --allow-risky=yes",
"vendor/bin/phpcpd ./ --exclude vendor --exclude tests --exclude src/Entity --exclude src/Serializer",
"vendor/bin/psalm --show-info=true"
],
Expand Down

0 comments on commit 42253a3

Please sign in to comment.