From ad9cf00002a0f0c943d10d36c07b8e4d2f07973f Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 22 Jan 2024 12:04:23 +0100 Subject: [PATCH 1/3] Mark heredoc_closing_marker and multiline_string_to_heredoc as "to be discussed" --- tests/RulesMaintenance/RulesList.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/RulesMaintenance/RulesList.php b/tests/RulesMaintenance/RulesList.php index 263f855..095ffda 100644 --- a/tests/RulesMaintenance/RulesList.php +++ b/tests/RulesMaintenance/RulesList.php @@ -60,6 +60,8 @@ public static function getToBeDiscussedRules(): array 'escape_implicit_backslashes', 'explicit_indirect_variable', 'global_namespace_import', + 'heredoc_closing_marker', // possibly undesired? + 'multiline_string_to_heredoc', // possibly undesired? 'multiline_whitespace_before_semicolons', // with new_line_for_chained_calls 'ordered_types', 'php_unit_method_casing', From 7c4bb7a1818a29cba3aab20aa074bf06e27808b3 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 22 Jan 2024 12:06:21 +0100 Subject: [PATCH 2/3] Add numeric_literal_separator --- src/Rules/AbstractRuleProvider.php | 1 + src/Rules/DefaultRulesProvider.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Rules/AbstractRuleProvider.php b/src/Rules/AbstractRuleProvider.php index ddf83ac..5517000 100644 --- a/src/Rules/AbstractRuleProvider.php +++ b/src/Rules/AbstractRuleProvider.php @@ -67,6 +67,7 @@ abstract class AbstractRuleProvider implements RulesProviderInterface '3.32.0' => ['no_unneeded_braces'], '3.33.0' => ['native_type_declaration_casing'], '3.42.0' => ['class_keyword'], + '3.47.0' => ['numeric_literal_separator'], ]; /** diff --git a/src/Rules/DefaultRulesProvider.php b/src/Rules/DefaultRulesProvider.php index 7003947..ba9754b 100644 --- a/src/Rules/DefaultRulesProvider.php +++ b/src/Rules/DefaultRulesProvider.php @@ -101,6 +101,7 @@ public function getRules(): array 'not_operator_with_successor_space' => true, 'normalize_index_brace' => true, 'nullable_type_declaration' => true, + 'numeric_literal_separator' => true, 'object_operator_without_whitespace' => true, 'octal_notation' => true, 'operator_linebreak' => true, From a5284c4d1610dca962a2fc302fc404fea2bb6725 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 22 Jan 2024 12:09:40 +0100 Subject: [PATCH 3/3] Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6a07a..22a400c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog --------- +## [1.2.0] - 2024-01-22 +- Add new `numeric_literal_separator` rule (#65) +- Map new heredoc rules as "to be discussed" (`heredoc_closing_marker`, `multiline_string_to_heredoc`) + ## [1.1.0] - 2023-12-28 - Add new risky `class_keyword` rule (#64) NB: the rule is experimental, and relies on runtime autoload to determine if a FCQN refers to an existing class