From 6da38be96e036f76bb793eca65ff31b51977dd32 Mon Sep 17 00:00:00 2001 From: Paul Brand Date: Thu, 18 Jul 2024 12:11:57 +0200 Subject: [PATCH 1/2] Remove blank line before yield so we can have nice phpunit dataproviders --- src/PhpCsFixer/Rules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index 2ab865c..cd55a4d 100644 --- a/src/PhpCsFixer/Rules.php +++ b/src/PhpCsFixer/Rules.php @@ -104,7 +104,7 @@ private static function getBaseRules(): array 'blank_line_before_statement' => [ 'statements' => [ 'break', 'continue', 'case', 'declare', 'default', 'do', 'for', 'foreach', - 'if', 'return', 'switch', 'throw', 'try', 'while', 'yield', + 'if', 'return', 'switch', 'throw', 'try', 'while', ], ], 'cast_spaces' => [ From ea7ee29909db386f0bf5353d615ed02161812936 Mon Sep 17 00:00:00 2001 From: Paul Brand Date: Thu, 18 Jul 2024 12:15:14 +0200 Subject: [PATCH 2/2] Replace deprecated rules - Rule "compact_nullable_typehint" is deprecated. Use "compact_nullable_type_declaration" instead. - Rule "escape_implicit_backslashes" is deprecated. Use "string_implicit_backslashes" instead. - Rule "native_function_type_declaration_casing" is deprecated. Use "native_type_declaration_casing" instead. --- src/PhpCsFixer/Rules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index cd55a4d..9802235 100644 --- a/src/PhpCsFixer/Rules.php +++ b/src/PhpCsFixer/Rules.php @@ -113,12 +113,12 @@ private static function getBaseRules(): array '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', ], 'dir_constant' => true, - 'escape_implicit_backslashes' => true, + 'string_implicit_backslashes' => true, 'explicit_indirect_variable' => true, 'explicit_string_variable' => true, 'fully_qualified_strict_types' => true, @@ -141,7 +141,7 @@ private static function getBaseRules(): array 'modernize_types_casting' => true, 'multiline_comment_opening_closing' => true, 'multiline_whitespace_before_semicolons' => true, - 'native_function_type_declaration_casing' => true, + 'native_type_declaration_casing' => true, 'no_alias_functions' => true, 'no_alternative_syntax' => true, 'no_extra_blank_lines' => [