From a5f137e84e03ba1f6ec5a8d5e205e1b236de089c Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sun, 22 Mar 2020 18:01:25 +0900 Subject: [PATCH 1/2] Ignore broken Emacs 27 indentation corruption with no use case --- tests/issue-186.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/issue-186.php b/tests/issue-186.php index c8490cff..f9aec023 100644 --- a/tests/issue-186.php +++ b/tests/issue-186.php @@ -21,7 +21,7 @@ case null: case false: echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) - echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) + echo 'test'; // Emacs27 breaks indentation in this case #612 } switch (true) { From 6959a3488205792e5aeebb312206f3e90ed8a1de Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sun, 22 Mar 2020 18:06:08 +0900 Subject: [PATCH 2/2] Add test case for constant and number --- tests/issue-186.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/issue-186.php b/tests/issue-186.php index f9aec023..7aca60a2 100644 --- a/tests/issue-186.php +++ b/tests/issue-186.php @@ -37,3 +37,14 @@ echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) } + +const AAA = 'AAA'; +const bbb = 'bbb'; + +switch (true) { +case AAA: +case bbb: +case 111: + echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) + echo 'test'; // ###php-mode-test### ((indent (* c-basic-offset 2))) +}