Skip to content

Commit

Permalink
[ci] upgrade php-cs-fixer 2.x -> 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow authored and weaverryan committed May 4, 2021
1 parent c6330a3 commit 2396836
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -2,5 +2,5 @@
/phpunit.xml
/vendor/
/tests/tmp/*
/.php_cs.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
5 changes: 2 additions & 3 deletions .php_cs.dist → .php-cs-fixer.dist.php
Expand Up @@ -4,7 +4,7 @@
exit(0);
}

$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('vendor')
->exclude('tests/tmp')
Expand All @@ -13,12 +13,11 @@
->notName('*.tpl.php')
;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(array(
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'header_comment' => [
'header' => <<<EOF
This file is part of the Symfony MakerBundle package.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -29,7 +29,7 @@
"composer/semver": "^3.0@dev",
"doctrine/doctrine-bundle": "^1.8|^2.0",
"doctrine/orm": "^2.3",
"friendsofphp/php-cs-fixer": "^2.8",
"friendsofphp/php-cs-fixer": "^3.0",
"friendsoftwig/twigcs": "^4.1.0|^5.0.0",
"symfony/http-client": "^4.3|^5.0",
"symfony/phpunit-bridge": "^4.3|^5.0",
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/test/.php_cs.test
Expand Up @@ -3,12 +3,11 @@
* php-cs-fixer configuration file used to validate
* generated code in our tests.
*/
return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(array(
'@Symfony' => true,
'@Symfony:risky' => true,
'native_function_invocation' => false,
'array_syntax' => ['syntax' => 'short'],
))
->setRiskyAllowed(true)
;

0 comments on commit 2396836

Please sign in to comment.