diff --git a/.gitignore b/.gitignore index 8fa433d..f4e66ee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ !/bin/poser /coverage /vendor -.php_cs.cache +/.*.cache composer.lock diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 0000000..8785899 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,24 @@ +in(__DIR__) + ->exclude(['vendor']) +; + +return (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + '@PHP74Migration:risky' => true, + '@PHPUnit75Migration:risky' => true, + 'declare_strict_types' => false, + 'native_function_invocation' => ['include' => ['@all']], + 'concat_space' => ['spacing' => 'one'], + 'binary_operator_spaces' => ['operators' => ['=>' => 'align', '=' => 'align']], + 'phpdoc_align' => ['align' => 'vertical'], + 'phpdoc_summary' => false, + ]) + ->setFinder($finder) +; diff --git a/.php_cs b/.php_cs deleted file mode 100644 index b87a883..0000000 --- a/.php_cs +++ /dev/null @@ -1,29 +0,0 @@ -in(__DIR__) - ->exclude(['vendor']) -; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHP71Migration:risky' => true, - '@PHPUnit60Migration:risky' => true, - 'array_syntax' => ['syntax' => 'short'], - 'ordered_imports' => true, - 'declare_strict_types' => false, - 'native_function_invocation' => true, - 'concat_space' => ['spacing' => 'one'], - 'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], - 'single_blank_line_at_eof' => true, - 'phpdoc_align' => ['align' => 'vertical'], - 'phpdoc_separation' => true, - 'phpdoc_summary' => false, - 'random_api_migration' => true, - ]) - ->setFinder($finder) -; diff --git a/composer.json b/composer.json index bd4fe5c..e7960c9 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "behat/behat": "^3.8", "phpspec/phpspec": "^7.0", "friends-of-phpspec/phpspec-code-coverage": "^6.0", - "friendsofphp/php-cs-fixer": "^2.17", + "friendsofphp/php-cs-fixer": "^3.5", "moave/phpspec-data-provider-extension": "dev-feat/add-compatibility-to-php80", "vimeo/psalm": "^4.3" },