Skip to content

Commit 7dc8b99

Browse files
committed
Fix deprecations in cs fixer config
1 parent cb7e1e6 commit 7dc8b99

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

.php-cs-fixer.dist.php

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@
4343
'yield',
4444
],
4545
],
46-
'braces' => [
47-
'allow_single_line_closure' => false,
48-
'position_after_anonymous_constructs' => 'same',
49-
'position_after_control_structures' => 'same',
50-
'position_after_functions_and_oop_constructs' => 'same'
51-
],
46+
// deprecated fixer removed: "braces"; use dedicated rules provided by PHP-CS-Fixer instead
5247
'cast_spaces' => ['space' => 'none'],
5348

5449
// This fixer removes the blank line at class start, no way to disable that, so we disable the fixer :(
@@ -92,12 +87,13 @@
9287
'import_functions' => true,
9388
],
9489
'native_function_invocation' => false,
95-
'new_with_braces' => false,
90+
// "new_with_braces" is deprecated → use "new_with_parentheses"
91+
'new_with_parentheses' => false,
9692
'no_alias_functions' => true,
9793
'no_alternative_syntax' => true,
9894
'no_blank_lines_after_class_opening' => false,
9995
'no_blank_lines_after_phpdoc' => true,
100-
'no_blank_lines_before_namespace' => true,
96+
'blank_lines_before_namespace' => false,
10197
'no_closing_tag' => true,
10298
'no_empty_comment' => true,
10399
'no_empty_phpdoc' => true,
@@ -114,15 +110,17 @@
114110
'echo_tag_syntax' => ['format' => 'long'],
115111
'no_singleline_whitespace_before_semicolons' => true,
116112
'no_spaces_after_function_name' => true,
117-
'no_spaces_inside_parenthesis' => true,
113+
// deprecated: no_spaces_inside_parenthesis → use spaces_inside_parentheses
114+
'spaces_inside_parentheses' => ['space' => 'none'],
118115
'no_superfluous_elseif' => true,
119116
'no_superfluous_phpdoc_tags' => true,
120-
'no_trailing_comma_in_list_call' => true,
117+
// deprecated: no_trailing_comma_in_list_call (covered by no_trailing_comma_in_singleline)
121118
'no_trailing_comma_in_singleline' => true,
122119
'no_trailing_whitespace' => true,
123120
'no_trailing_whitespace_in_comment' => true,
124121
'no_unneeded_control_parentheses' => false,
125-
'no_unneeded_curly_braces' => false,
122+
// deprecated: no_unneeded_curly_braces → use no_unneeded_braces
123+
'no_unneeded_braces' => false,
126124
'no_unneeded_final_method' => true,
127125
'no_unreachable_default_argument_value' => true,
128126
'no_unset_on_property' => true,
@@ -201,13 +199,8 @@
201199
'trailing_comma_in_multiline' => false,
202200
'trim_array_spaces' => true,
203201
'unary_operator_spaces' => true,
204-
'visibility_required' => [
205-
'elements' => [
206-
'const',
207-
'method',
208-
'property',
209-
],
210-
],
202+
// deprecated: visibility_required → use modifier_keywords
203+
'modifier_keywords' => true,
211204
'void_return' => true,
212205
'whitespace_after_comma_in_array' => true,
213206
'yoda_style' => false

0 commit comments

Comments
 (0)