From c0063dc29da2cc6b9157d595ab7d6c1f94c05cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 21 Oct 2023 12:34:52 +0200 Subject: [PATCH 1/2] Fix: Do not configure deprecated fixers --- .php-cs-fixer.dist.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 7ff3aa54e9b..e9f9d8cf66e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -72,6 +72,10 @@ 'yield_from', ], ], + 'braces_position' => [ + 'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ @@ -85,15 +89,11 @@ 'combine_consecutive_issets' => true, 'combine_consecutive_unsets' => true, 'combine_nested_dirname' => true, - 'compact_nullable_typehint' => true, + 'compact_nullable_type_declaration' => true, 'concat_space' => ['spacing' => 'one'], 'constant_case' => true, 'control_structure_braces' => true, 'control_structure_continuation_position' => true, - 'curly_braces_position' => [ - 'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end', - 'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end', - ], 'declare_equal_normalize' => ['space' => 'none'], 'declare_parentheses' => true, 'declare_strict_types' => true, @@ -147,8 +147,8 @@ '@internal', ], ], - 'native_function_type_declaration_casing' => true, - 'new_with_braces' => [ + 'native_type_declaration_casing' => true, + 'new_with_parentheses' => [ 'named_class' => false, 'anonymous_class' => false, ], @@ -185,8 +185,8 @@ 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'no_trailing_whitespace_in_string' => true, + 'no_unneeded_braces' => true, 'no_unneeded_control_parentheses' => true, - 'no_unneeded_curly_braces' => true, 'no_unneeded_final_method' => true, 'no_unneeded_import_alias' => true, 'no_unreachable_default_argument_value' => true, From cc8c08990a82b655e40d218100d2fba3e91c0f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 22 Oct 2023 10:48:33 +0200 Subject: [PATCH 2/2] Fix: Keep fixers and options sorted by name --- .php-cs-fixer.dist.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e9f9d8cf66e..4ea82e091df 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -41,10 +41,6 @@ ], ], 'blank_line_after_namespace' => true, - 'blank_lines_before_namespace' => [ - 'max_line_breaks' => 1, - 'min_line_breaks' => 0, - ], 'blank_line_before_statement' => [ 'statements' => [ 'break', @@ -72,9 +68,13 @@ 'yield_from', ], ], + 'blank_lines_before_namespace' => [ + 'max_line_breaks' => 1, + 'min_line_breaks' => 0, + ], 'braces_position' => [ - 'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end', 'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end', ], 'cast_spaces' => true, 'class_attributes_separation' => [ @@ -149,8 +149,8 @@ ], 'native_type_declaration_casing' => true, 'new_with_parentheses' => [ - 'named_class' => false, 'anonymous_class' => false, + 'named_class' => false, ], 'no_alias_functions' => true, 'no_alias_language_construct_call' => true,