Skip to content

Commit

Permalink
Migrate configuration file for PHP CS Fixer 2.19/3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed May 15, 2021
1 parent dffdc71 commit 1462a32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
vendor/
composer.lock
phpunit.xml
.php_cs.cache
.php-cs-fixer.cache
.php-cs-fixer.php
.phpunit.result.cache
composer.phar
package.tar
Expand Down
5 changes: 3 additions & 2 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exit(0);
}

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
Expand All @@ -14,7 +14,7 @@
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
(new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->append([__FILE__])
->notPath('#/Fixtures/#')
Expand All @@ -39,4 +39,5 @@
->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php')
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
)
->setCacheFile('.php-cs-fixer.cache')
;

0 comments on commit 1462a32

Please sign in to comment.