File tree 5 files changed +27
-7
lines changed
5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,23 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this
12
12
### Changed
13
13
14
14
* Make ` php-mode ` inherit from ` php-base-mode ` instead of ` c-mode ` ([ #772 ] )
15
+ * Modify indentation of [ PEAR Coding Standards] ([ #774 ] , [ #777 ] )
16
+ * No longer overindent it by default, since we don't see any mention in the coding style that it should hang ` . ` . (refs [ #227 ] and [ #229 ] )
17
+ * ** If you have any feedback on PEAR style, please let us know in [ the discussion #776 ] [ #776 ] .**
15
18
16
19
### Removed
17
20
18
21
* Remove ` php-mode-disable-c-mode-hook ` custom variable and ` php-mode-neutralize-cc-mode-effect ` function ([ #775 ] )
19
22
* ` php-mode ` no longer inherits ` c-mode ` , so this variable won't work.
20
23
24
+ [ #227 ] : https://github.com/emacs-php/php-mode/pull/227
25
+ [ #229 ] : https://github.com/emacs-php/php-mode/pull/229
21
26
[ #772 ] : https://github.com/emacs-php/php-mode/pull/772
27
+ [ #774 ] : https://github.com/emacs-php/php-mode/issues/774
22
28
[ #775 ] : https://github.com/emacs-php/php-mode/pull/775
29
+ [ #776 ] : https://github.com/emacs-php/php-mode/discussions/776
30
+ [ #777 ] : https://github.com/emacs-php/php-mode/pull/777
31
+ [ PEAR Coding Standards ] : https://pear.php.net/manual/en/standards.php
23
32
24
33
## [ 1.25.1] - 2023-11-24
25
34
Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ a backward search limit."
709
709
" pear"
710
710
'(" php"
711
711
(c-basic-offset . 4 )
712
- (c-offsets-alist . ((case-label . 0 )))
712
+ (c-offsets-alist . ((case-label . 0 ) (statement-cont . + ) ))
713
713
(tab-width . 4 )
714
714
(php-mode-lineup-cascaded-calls . nil )))
715
715
Original file line number Diff line number Diff line change 8
8
9
9
function my_func () {
10
10
return "a really long string with = inside " .
11
- "some more text " ; // ###php-mode-test### ((indent 49 ))
11
+ "some more text " ; // ###php-mode-test### ((indent 8 ))
12
12
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ someObject ->someFunction ("some " , "parameter " ) // ###php-mode-test### ((indent 0))
4
+ ->someOtherFunc (23 , 42 ) // ###php-mode-test### ((indent 4))
5
+ ->andAThirdFunction (); // ###php-mode-test### ((indent 4))
6
+
7
+ $ result = DateTime::createFromFormat ('Y-m-d ' , '2112-09-03 ' ) // ###php-mode-test### ((indent 0))
8
+ ->someFunction (); // ###php-mode-test### ((indent 4))
9
+
10
+ $ pages = $ dbOld ->createQueryBuilder () // ###php-mode-test### ((indent 0))
11
+ ->select ('* ' ); // ###php-mode-test### ((indent 4))
Original file line number Diff line number Diff line change @@ -522,11 +522,6 @@ style from Drupal."
522
522
(search-forward " return" )
523
523
(should (eq (current-indentation ) (* 2 c-basic-offset)))))
524
524
525
- (ert-deftest php-mode-test-issue-227 ()
526
- " multi-line strings indents "
527
- (custom-set-variables '(php-lineup-cascaded-calls t ))
528
- (with-php-mode-test (" issue-227.php" :indent t :style pear :magic t )))
529
-
530
525
(ert-deftest php-mode-test-issue-237 ()
531
526
" Indent chaining method for PSR2."
532
527
(with-php-mode-test (" issue-237.php" :indent t :style psr2 :magic t )))
@@ -696,6 +691,11 @@ Meant for `php-mode-test-issue-503'."
696
691
(with-php-mode-test (" lang/errorcontrol.php" :faces t ))
697
692
(with-php-mode-test (" lang/magical-constants/echo.php" :faces t )))
698
693
694
+ (ert-deftest php-mode-test-pear ()
695
+ " Tests for PEAR style."
696
+ (with-php-mode-test (" indent/issue-227.php" :indent t :magic t :style pear))
697
+ (with-php-mode-test (" indent/issue-774.php" :indent t :magic t :style pear)))
698
+
699
699
; ; For developers: How to make .faces list file.
700
700
; ;
701
701
; ; 1. Press `M-x eval-buffer' in this file bufffer.
You can’t perform that action at this time.
0 commit comments