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 !var/sessions/.gitkeep
/bin/* /bin/*
!/bin/console !/bin/console
.php_cs.cache .php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.result.cache .phpunit.result.cache
phpunit.xml phpunit.xml

View file

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