Skip to content

Commit a6317cb

Browse files
authored
[TASK] Avoid deprecated php-cs-fixer rules (#898)
Update ruleset, show no progress on CI, activate parallel runners.
1 parent 3f83134 commit a6317cb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: COMPOSER_ROOT_VERSION=dev-main composer update
3737

3838
- name: CGL check
39-
run: vendor/bin/php-cs-fixer fix --dry-run --diff -v
39+
run: vendor/bin/php-cs-fixer fix -v --diff --dry-run --show-progress none
4040

4141
- name: Phpstan
4242
run: vendor/bin/phpstan analyze --no-progress

.php-cs-fixer.dist.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
4+
25
if (PHP_SAPI !== 'cli') {
36
die('CLI only.');
47
}
@@ -10,24 +13,24 @@
1013
return (new PhpCsFixer\Config())
1114
->setRiskyAllowed(true)
1215
->setUsingCache(false)
16+
->setParallelConfig(ParallelConfigFactory::detect())
1317
->setFinder($finder)
1418
->setRules([
1519
'@DoctrineAnnotation' => true,
16-
'@PER' => true,
20+
'@PER-CS' => true,
1721
'array_syntax' => ['syntax' => 'short'],
1822
'blank_line_after_opening_tag' => true,
1923
'cast_spaces' => ['space' => 'none'],
20-
'compact_nullable_typehint' => true,
24+
'compact_nullable_type_declaration' => true,
2125
'concat_space' => ['spacing' => 'one'],
2226
'declare_parentheses' => true,
2327
'declare_equal_normalize' => ['space' => 'none'],
2428
'dir_constant' => true,
25-
'function_typehint_space' => true,
2629
'lowercase_cast' => true,
2730
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
2831
'modernize_types_casting' => true,
2932
'native_function_casing' => true,
30-
'new_with_braces' => true,
33+
'new_with_parentheses' => true,
3134
'no_alias_functions' => true,
3235
'no_blank_lines_after_phpdoc' => true,
3336
'no_empty_phpdoc' => true,
@@ -64,6 +67,7 @@
6467
'single_space_around_construct' => true,
6568
'single_line_comment_style' => ['comment_types' => ['hash']],
6669
'single_trait_insert_per_statement' => true,
70+
'type_declaration_spaces' => true,
6771
'whitespace_after_comma_in_array' => true,
6872
'header_comment' => [
6973
'header' => 'This file belongs to the package "TYPO3 Fluid".' . chr(10) .

0 commit comments

Comments
 (0)