Merge pull request #5914 from yguedidi/remove-php-cs-fixer-deprecations

Remove PHP-CS-Fixer deprecations
This commit is contained in:
Kevin Decherf 2022-08-15 14:42:58 +02:00 committed by GitHub
commit 935070f2a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

3
.gitignore vendored
View file

@ -11,7 +11,8 @@
!var/sessions/.gitkeep
/bin/*
!/bin/console
.php_cs.cache
.php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.result.cache
phpunit.xml

View file

@ -1,6 +1,7 @@
<?php
return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
@ -10,16 +11,18 @@ return PhpCsFixer\Config::create()
],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_consecutive_blank_lines' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
],
],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
@ -28,7 +31,7 @@ return PhpCsFixer\Config::create()
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
// 'psr4' => true,
// 'psr_autoloading' => true,
'strict_comparison' => true,
'strict_param' => true,
'concat_space' => [
@ -45,4 +48,5 @@ return PhpCsFixer\Config::create()
])
->in(__DIR__)
)
->setCacheFile('.php-cs-fixer.cache')
;