Emacs PHP Mode
-[](https://www.gnu.org/software/emacs/)
-[](https://php.net/manual/migration82.php)
+[](https://www.gnu.org/software/emacs/)
+[](https://php.net/manual/migration83.php)
[](https://php.net/downloads.php)
[](https://github.com/emacs-php/php-mode/actions)
[][gpl-v3]
diff --git a/README.md b/README.md
index f02e9428..b2726c5d 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
Emacs PHP Mode
-[](https://www.gnu.org/software/emacs/)
-[](https://php.net/manual/migration82.php)
-[](https://php.net/downloads.php)
+[](https://www.gnu.org/software/emacs/)
+[](https://www.php.net/manual/migration83.php)
+[](https://www.php.net/downloads.php)
[](https://github.com/emacs-php/php-mode/actions)
[][gpl-v3]
[![NonGNU ELPA][nongnu-elpa-badge]][nongnu-elpa]
diff --git a/lisp/php-align.el b/lisp/php-align.el
index de4fe3cf..e9acc469 100644
--- a/lisp/php-align.el
+++ b/lisp/php-align.el
@@ -7,7 +7,7 @@
;; Maintainer: USAMI Kenta
;; Keywords: php languages convenience align
;; Homepage: https://github.com/emacs-php/php-mode
-;; Version: 1.25.1
+;; Version: 1.26.1
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-complete.el b/lisp/php-complete.el
index 28ac52fe..f2b1aa42 100644
--- a/lisp/php-complete.el
+++ b/lisp/php-complete.el
@@ -6,7 +6,7 @@
;; Author: USAMI Kenta
;; Created: 18 Sep 2022
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Keywords: languages, php
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-defs.el b/lisp/php-defs.el
index 37bd682d..8be83138 100644
--- a/lisp/php-defs.el
+++ b/lisp/php-defs.el
@@ -4,7 +4,7 @@
;; Author: USAMI Kenta
;; Created: 5 Mar 2022
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Keywords: languages, php
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-face.el b/lisp/php-face.el
index 70db33e0..147fb813 100644
--- a/lisp/php-face.el
+++ b/lisp/php-face.el
@@ -4,7 +4,7 @@
;; Author: USAMI Kenta
;; Created: 5 May 2019
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Keywords: faces, php
;; Homepage: https://github.com/emacs-php/php-mode
;; License: GPL-3.0-or-later
@@ -55,20 +55,42 @@
:group 'php-faces
:tag "PHP Function Name")
-(defface php-function-call '((t ()))
+(defface php-function-call-standard `((t ,(when (eval-when-compile (get 'font-lock-function-call-face 'face-defface-spec))
+ '(:inherit font-lock-function-call-face))))
"PHP Mode face used to highlight function names in calles."
:group 'php-faces
- :tag "PHP Function Call")
+ :tag "PHP Function Call Standard")
-(defface php-method-call '((t (:inherit php-function-call)))
+(defface php-function-call-traditional '((t ()))
+ "PHP Mode face used to highlight function names in calles."
+ :group 'php-faces
+ :tag "PHP Function Call Traditional")
+
+(define-obsolete-face-alias 'php-function-call 'php-function-call-traditional "1.26.0")
+
+(defface php-method-call-standard '((t (:inherit php-function-call-standard)))
+ "PHP Mode face used to highlight method names in calles."
+ :group 'php-faces
+ :tag "PHP Method Call Standard")
+
+(defface php-method-call-traditional '((t (:inherit php-function-call-traditional)))
"PHP Mode face used to highlight method names in calles."
:group 'php-faces
- :tag "PHP Method Call")
+ :tag "PHP Method Call Traditional")
-(defface php-static-method-call '((t (:inherit php-method-call)))
+(define-obsolete-face-alias 'php-method-call 'php-method-call-traditional "1.26.0")
+
+(defface php-static-method-call-standard '((t (:inherit php-method-call-standard)))
+ "PHP Mode face used to highlight static method names in calles."
+ :group 'php-faces
+ :tag "PHP Static Method Call Standard")
+
+(defface php-static-method-call-traditional '((t (:inherit php-method-call-traditional)))
"PHP Mode face used to highlight static method names in calles."
:group 'php-faces
- :tag "PHP Static Method Call")
+ :tag "PHP Static Method Call Traditional")
+
+(define-obsolete-face-alias 'php-static-method-call 'php-static-method-call-traditional "1.26.0")
(defface php-variable-name '((t (:inherit font-lock-variable-name-face)))
"PHP Mode face used to highlight variable names."
@@ -156,16 +178,19 @@ The operator is also knows as \"Paamayim Nekudotayim\"."
:group 'php-faces
:tag "PHP Magical Constant")
-(defface php-$this '((t (:inherit php-constant)))
+(defface php-this '((t (:inherit php-constant)))
"PHP Mode face used to highlight $this variables."
:group 'php-faces
:tag "PHP $this")
-(defface php-$this-sigil '((t (:inherit php-constant)))
+(defface php-this-sigil '((t (:inherit php-constant)))
"PHP Mode face used to highlight sigils($) of $this variable."
:group 'php-faces
:tag "PHP $this Sigil")
+(define-obsolete-face-alias 'php-$this 'php-this "1.26.0")
+(define-obsolete-face-alias 'php-$this-sigil 'php-this-sigil "1.26.0")
+
(defface php-errorcontrol-op '((t (:inherit font-lock-type-face)))
"PHP Mode face used to highlight errorcontrol operators (@).."
:group 'php-faces
diff --git a/lisp/php-flymake.el b/lisp/php-flymake.el
index 37e4aea4..8efad224 100644
--- a/lisp/php-flymake.el
+++ b/lisp/php-flymake.el
@@ -4,7 +4,7 @@
;; Author: USAMI Kenta
;; Created: 5 Mar 2022
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Keywords: tools, languages, php
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-ide-phpactor.el b/lisp/php-ide-phpactor.el
index 831f49be..f0a98c82 100644
--- a/lisp/php-ide-phpactor.el
+++ b/lisp/php-ide-phpactor.el
@@ -5,7 +5,7 @@
;; Author: USAMI Kenta
;; Keywords: tools, files
;; URL: https://github.com/emacs-php/php-mode
-;; Version: 1.25.1
+;; Version: 1.26.1
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-ide.el b/lisp/php-ide.el
index 9f63cdee..a48cf1e0 100644
--- a/lisp/php-ide.el
+++ b/lisp/php-ide.el
@@ -5,7 +5,7 @@
;; Author: USAMI Kenta
;; Keywords: tools, files
;; URL: https://github.com/emacs-php/php-mode
-;; Version: 1.25.1
+;; Version: 1.26.1
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
@@ -178,6 +178,7 @@
:type 'string
:safe #'stringp)
+;;;###autoload
(defcustom php-ide-mode-functions nil
"Hook functions called when before activating or deactivating PHP-IDE.
Notice that two arguments (FEATURE ACTIVATE) are given.
@@ -188,9 +189,7 @@ ACTIVATE: T is given when activeting, NIL when deactivating PHP-IDE."
:group 'php-ide
:type '(repeat function)
:safe (lambda (functions)
- (and (listp functions)
- (cl-loop for function in functions
- always (functionp function)))))
+ (and (listp functions) (cl-every #'functionp functions))))
;;;###autoload
(define-minor-mode php-ide-mode
diff --git a/lisp/php-mode-debug.el b/lisp/php-mode-debug.el
index a3e2d1da..efe6e48e 100644
--- a/lisp/php-mode-debug.el
+++ b/lisp/php-mode-debug.el
@@ -5,7 +5,7 @@
;; Author: USAMI Kenta
;; URL: https://github.com/emacs-php/php-mode
;; Keywords: maint
-;; Version: 1.25.1
+;; Version: 1.26.1
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index 022b2a62..d9b73264 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -1,6 +1,6 @@
;;; php-mode.el --- Major mode for editing PHP code -*- lexical-binding: t; -*-
-;; Copyright (C) 2023 Friends of Emacs-PHP development
+;; Copyright (C) 2024 Friends of Emacs-PHP development
;; Copyright (C) 1999, 2000, 2001, 2003, 2004 Turadg Aleahmad
;; 2008 Aaron S. Hawley
;; 2011, 2012, 2013, 2014, 2015, 2016, 2017 Eric James Michael Ritz
@@ -9,13 +9,13 @@
;; Maintainer: USAMI Kenta
;; URL: https://github.com/emacs-php/php-mode
;; Keywords: languages php
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Package-Requires: ((emacs "26.1"))
;; License: GPL-3.0-or-later
(eval-and-compile
(make-obsolete-variable
- (defconst php-mode-version-number "1.25.1" "PHP Mode version number.")
+ (defconst php-mode-version-number "1.26.1" "PHP Mode version number.")
"Please call (php-mode-version :as-number t) for compatibility." "1.24.2"))
;; This program is free software; you can redistribute it and/or modify
@@ -292,13 +292,6 @@ In that case set to `NIL'."
:tag "PHP Mode Enable Backup Style Variables"
:type 'boolean)
-(define-obsolete-variable-alias 'php-mode-disable-parent-mode-hooks 'php-mode-disable-c-mode-hook "1.21.0")
-(defcustom php-mode-disable-c-mode-hook t
- "When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')."
- :tag "PHP Mode Disable C Mode Hook"
- :type 'boolean)
-(make-obsolete-variable 'php-mode-disable-c-mode-hook nil "1.24.2")
-
(defcustom php-mode-enable-project-local-variable t
"When set to `T', apply project local variable to buffer local variable."
:tag "PHP Mode Enable Project Local Variable"
@@ -327,6 +320,7 @@ as a function. Call with AS-NUMBER keyword to compare by `version<'.
(defvar php-mode-map
(let ((map (make-sparse-keymap "PHP Mode")))
+ (set-keymap-parent map c-mode-base-map)
;; Remove menu item for c-mode
(define-key map [menu-bar C] nil)
@@ -715,7 +709,7 @@ a backward search limit."
"pear"
'("php"
(c-basic-offset . 4)
- (c-offsets-alist . ((case-label . 0)))
+ (c-offsets-alist . ((case-label . 0) (statement-cont . +)))
(tab-width . 4)
(php-mode-lineup-cascaded-calls . nil)))
@@ -1131,13 +1125,6 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
(php-project-apply-local-variables)
(remove-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay))
-(defun php-mode-neutralize-cc-mode-effect ()
- "Reset PHP-irrelevant variables set by Cc Mode initialization."
- (setq-local c-mode-hook nil)
- (setq-local java-mode-hook nil)
- (remove-hook 'flymake-diagnostic-functions 'flymake-cc t)
- t)
-
(defvar php-mode-syntax-table
(let ((table (make-syntax-table)))
(c-populate-syntax-table table)
@@ -1150,26 +1137,28 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
table))
;;;###autoload
-(define-derived-mode php-mode c-mode "PHP"
+(define-derived-mode php-mode php-base-mode "PHP"
"Major mode for editing PHP code.
\\{php-mode-map}"
:syntax-table php-mode-syntax-table
- ;; :after-hook (c-update-modeline)
- ;; (setq abbrev-mode t)
-
+ :after-hook (progn (c-make-noise-macro-regexps)
+ (c-make-macro-with-semi-re)
+ (c-update-modeline))
(unless (string= php-mode-cc-version c-version)
(php-mode-debug-reinstall nil))
- (if php-mode-disable-c-mode-hook
- (php-mode-neutralize-cc-mode-effect)
- (display-warning 'php-mode
- "`php-mode-disable-c-mode-hook' will be removed. Do not depends on this variable."
- :warning))
-
(c-initialize-cc-mode t)
+ (setq abbrev-mode t)
+
+ ;; Must be called once as c-mode to enable font-lock for Heredoc.
+ ;; TODO: This call may be removed in the future.
+ (c-common-init 'c-mode)
+
(c-init-language-vars php-mode)
(c-common-init 'php-mode)
+ (cc-imenu-init cc-imenu-c-generic-expression)
+
(setq-local c-auto-align-backslashes nil)
(setq-local comment-start "// ")
@@ -1252,13 +1241,8 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
(advice-add 'acm-backend-tabnine-candidate-expand
:filter-args #'php-acm-backend-tabnine-candidate-expand-filter-args)
- (when (>= emacs-major-version 25)
- (with-silent-modifications
- (save-excursion
- (let* ((start (point-min))
- (end (min (point-max)
- (+ start syntax-propertize-chunk-size))))
- (php-syntax-propertize-function start end))))))
+ (when (eval-when-compile (>= emacs-major-version 25))
+ (syntax-ppss-flush-cache (point-min))))
(declare-function semantic-create-imenu-index "semantic/imenu" (&optional stream))
@@ -1331,6 +1315,7 @@ for \\[find-tag] (which see)."
"return" "throws" "var" "self-out" "this-out" "param-out"
"type" "extends" "require-extends" "implemtents" "require-implements"
"template" "template-covariant" "template-extends" "template-implements"
+ "require-extends" "require-implements"
"assert" "assert-if-true" "assert-if-false" "if-this-is")
"A list of tags specifying type names.")
@@ -1381,14 +1366,14 @@ for \\[find-tag] (which see)."
;; Highlight variables, e.g. 'var' in '$var' and '$obj->var', but
;; not in $obj->var()
- ("\\(->\\)\\(\\sw+\\)\\s-*(" (1 'php-object-op) (2 'php-method-call))
+ ("\\(->\\)\\(\\sw+\\)\\s-*(" (1 'php-object-op) (2 php-method-call))
("\\<\\(const\\)\\s-+\\(\\_<.+?\\_>\\)" (1 'php-keyword) (2 'php-constant-assign))
;; Logical operator (!)
("\\(!\\)[^=]" 1 'php-logical-op)
;; Highlight special variables
- ("\\(\\$\\)\\(this\\)\\>" (1 'php-$this-sigil) (2 'php-$this))
+ ("\\(\\$\\)\\(this\\)\\>" (1 'php-this-sigil) (2 'php-this))
("\\(\\$+\\)\\(\\sw+\\)" (1 'php-variable-sigil) (2 'php-variable-name))
("\\(->\\)\\([a-zA-Z0-9_]+\\)" (1 'php-object-op) (2 'php-property-name))
@@ -1423,7 +1408,7 @@ for \\[find-tag] (which see)."
;; Highlight static method calls as such. This is necessary for method
;; names which are identical to keywords to be highlighted correctly.
- ("\\sw+::\\(\\sw+\\)(" 1 'php-static-method-call)
+ ("\\sw+::\\(\\sw+\\)(" 1 php-static-method-call)
;; Multiple catch (FooException | BarException $e)
(,(rx symbol-start "catch" symbol-end
(* (syntax whitespace)) "(" (* (syntax whitespace))
@@ -1467,7 +1452,7 @@ for \\[find-tag] (which see)."
(1 'php-import-declaration)
(,(rx (group (+ (or (syntax word) (syntax symbol) "\\" "{" "}")))) nil nil (1 'php-constant-assign t)))
;; Highlight function calls
- ("\\(\\_<\\(?:\\sw\\|\\s_\\)+?\\_>\\)\\s-*(" 1 'php-function-call)
+ ("\\(\\_<\\(?:\\sw\\|\\s_\\)+?\\_>\\)\\s-*(" 1 php-function-call)
;; Highlight all upper-cased symbols as constant
("\\<\\([A-Z_][A-Z0-9_]+\\)\\>" 1 'php-constant)
diff --git a/lisp/php-project.el b/lisp/php-project.el
index 6d20e455..81899803 100644
--- a/lisp/php-project.el
+++ b/lisp/php-project.el
@@ -5,7 +5,7 @@
;; Author: USAMI Kenta
;; Keywords: tools, files
;; URL: https://github.com/emacs-php/php-mode
-;; Version: 1.25.1
+;; Version: 1.26.1
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
diff --git a/lisp/php.el b/lisp/php.el
index 3c5f3490..aa09b5df 100644
--- a/lisp/php.el
+++ b/lisp/php.el
@@ -5,7 +5,7 @@
;; Author: USAMI Kenta
;; Created: 5 Dec 2018
-;; Version: 1.25.1
+;; Version: 1.26.1
;; Keywords: languages, php
;; Homepage: https://github.com/emacs-php/php-mode
;; License: GPL-3.0-or-later
@@ -209,6 +209,24 @@ a completion list."
:group 'php
:tag "PHP Topsy Separator"
:type 'string)
+
+(defcustom php-function-call 'php-function-call-traditional
+ "Face name to use for method call."
+ :group 'php
+ :tag "PHP Function Call"
+ :type 'face)
+
+(defcustom php-method-call 'php-method-call-traditional
+ "Face name to use for method call."
+ :group 'php
+ :tag "PHP Method Call"
+ :type 'face)
+
+(defcustom php-static-method-call 'php-static-method-call-traditional
+ "Face name to use for method call."
+ :group 'php
+ :tag "PHP Static Method Call"
+ :type 'face)
;;; PHP Keywords
(defconst php-magical-constants
@@ -627,6 +645,15 @@ Look at the `php-executable' variable instead of the constant \"php\" command."
(setq mode nil)))
(or mode php-default-major-mode)))
+;;;###autoload
+(define-derived-mode php-base-mode prog-mode "PHP"
+ "Generic major mode for editing PHP.
+
+This mode is intended to be inherited by concrete major modes.
+Currently there are `php-mode' and `php-ts-mode'."
+ :group 'php
+ nil)
+
;;;###autoload
(defun php-mode-maybe ()
"Select PHP mode or other major mode."
@@ -665,7 +692,9 @@ Look at the `php-executable' variable instead of the constant \"php\" command."
"Return function signature and class name string for header line in topsy.
You can add the function to topsy with the code below:
- \(add-to-list 'topsy-mode-functions '\(php-mode . php-topsy-beginning-of-defun-with-class\)\)"
+
+ (add-to-list \\='topsy-mode-functions
+ \\='(php-mode . php-topsy-beginning-of-defun-with-class))"
(save-excursion
(goto-char (window-start))
(mapconcat
diff --git a/script/data/module_id_prefixes.php b/script/data/module_id_prefixes.php
index bd379958..93a01f5e 100644
--- a/script/data/module_id_prefixes.php
+++ b/script/data/module_id_prefixes.php
@@ -496,6 +496,7 @@
'curl' => [
'curlfile.',
'function.curl-',
+ 'function.curl_upkeep',
],
'dba' => [
'function.dba-',
@@ -705,6 +706,9 @@
'function.recode',
'function.recode-',
],
+ 'rnp' => [
+ 'function.rnp-',
+ ],
'runkit7' => [
'function.runkit7-',
],
@@ -721,6 +725,9 @@
'shmop' => [
'function.shmop-',
],
+ 'simdjson' => [
+ 'function.simdjson-'
+ ],
'simplexml' => [
'function.dom-import-simplexml',
'function.simplexml-',
diff --git a/tests/7.4/typed-property.php.faces b/tests/7.4/typed-property.php.faces
index fac03f33..660b7b0a 100644
--- a/tests/7.4/typed-property.php.faces
+++ b/tests/7.4/typed-property.php.faces
@@ -32,8 +32,8 @@
(" ")
("null" . php-constant)
(")\n {\n ")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("string" . php-property-name)
(" ")
@@ -48,10 +48,10 @@
(" ")
("print" . php-function-name)
("()\n {\n ")
- ("var_dump" . php-function-call)
+ ("var_dump" . php-function-call-traditional)
("(")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("string" . php-property-name)
(");\n }\n}\n\n(")
@@ -60,5 +60,5 @@
("Typed" . font-lock-type-face)
(")")
("->" . php-object-op)
- ("print" . php-method-call)
+ ("print" . php-method-call-traditional)
("();\n"))
diff --git a/tests/8.0/attribute/class.php.faces b/tests/8.0/attribute/class.php.faces
index a4381657..1d249b6a 100644
--- a/tests/8.0/attribute/class.php.faces
+++ b/tests/8.0/attribute/class.php.faces
@@ -24,10 +24,10 @@
#[WithoutArgument]
#[")
- ("SingleArgument" . php-function-call)
+ ("SingleArgument" . php-function-call-traditional)
("(0)]
#[")
- ("FewArguments" . php-function-call)
+ ("FewArguments" . php-function-call-traditional)
("(")
("'Hello'" . php-string)
(", ")
@@ -40,9 +40,9 @@
("() {}
#[WithoutArgument] #[")
- ("SingleArgument" . php-function-call)
+ ("SingleArgument" . php-function-call-traditional)
("(0)] #[")
- ("FewArguments" . php-function-call)
+ ("FewArguments" . php-function-call-traditional)
("(")
("'Hello'" . php-string)
(", ")
@@ -55,11 +55,11 @@
("() {}
#[")
- ("Attr2" . php-function-call)
+ ("Attr2" . php-function-call-traditional)
("(")
("\"foo\"" . php-string)
("), ")
- ("Attr2" . php-function-call)
+ ("Attr2" . php-function-call-traditional)
("(")
("\"bar\"" . php-string)
(")]
diff --git a/tests/8.0/attribute/function.php.faces b/tests/8.0/attribute/function.php.faces
index da2aea6c..00cedf07 100644
--- a/tests/8.0/attribute/function.php.faces
+++ b/tests/8.0/attribute/function.php.faces
@@ -11,10 +11,10 @@
#[WithoutArgument]
#[")
- ("SingleArgument" . php-function-call)
+ ("SingleArgument" . php-function-call-traditional)
("(0)]
#[")
- ("FewArguments" . php-function-call)
+ ("FewArguments" . php-function-call-traditional)
("(")
("'Hello'" . php-string)
(", ")
@@ -27,9 +27,9 @@
("() {}
#[WithoutArgument]#[")
- ("SingleArgument" . php-function-call)
+ ("SingleArgument" . php-function-call-traditional)
("(0)]#[")
- ("FewArguments" . php-function-call)
+ ("FewArguments" . php-function-call-traditional)
("(")
("'Hello'" . php-string)
(", ")
diff --git a/tests/constants.php.faces b/tests/constants.php.faces
index 28f9523d..6718eb44 100644
--- a/tests/constants.php.faces
+++ b/tests/constants.php.faces
@@ -46,7 +46,7 @@
(";\n")
("SomeClass" . php-constant)
("::" . php-paamayim-nekudotayim)
- ("classIdentifier" . php-static-method-call)
+ ("classIdentifier" . php-static-method-call-traditional)
("();\n\n")
("__halt_compiler" . php-keyword)
("();\n\n")
diff --git a/tests/identifiers.php.faces b/tests/identifiers.php.faces
index fbb56dfa..df098c90 100644
--- a/tests/identifiers.php.faces
+++ b/tests/identifiers.php.faces
@@ -43,15 +43,15 @@
("the constant face. Just like c++-mode \"NS::Class::method()\"\n" . font-lock-comment-face)
("ClassName" . php-constant)
("::" . php-paamayim-nekudotayim)
- ("method" . php-static-method-call)
+ ("method" . php-static-method-call-traditional)
("();\n")
("\\SpaceName\\ClassName" . php-constant)
("::" . php-paamayim-nekudotayim)
- ("method" . php-static-method-call)
+ ("method" . php-static-method-call-traditional)
("();\n")
("\\My_Class" . php-constant)
("::" . php-paamayim-nekudotayim)
- ("method" . php-static-method-call)
+ ("method" . php-static-method-call-traditional)
("();\n\n")
("__halt_compiler" . php-keyword)
("();\n\n")
diff --git a/tests/issue-227.php b/tests/indent/issue-227.php
similarity index 77%
rename from tests/issue-227.php
rename to tests/indent/issue-227.php
index daf9200f..6f3c83f8 100644
--- a/tests/issue-227.php
+++ b/tests/indent/issue-227.php
@@ -8,5 +8,5 @@
function my_func() {
return "a really long string with = inside " .
-"some more text"; // ###php-mode-test### ((indent 49))
+"some more text"; // ###php-mode-test### ((indent 8))
}
diff --git a/tests/indent/issue-774.php b/tests/indent/issue-774.php
new file mode 100644
index 00000000..118cfc06
--- /dev/null
+++ b/tests/indent/issue-774.php
@@ -0,0 +1,11 @@
+someFunction("some", "parameter") // ###php-mode-test### ((indent 0))
+ ->someOtherFunc(23, 42) // ###php-mode-test### ((indent 4))
+ ->andAThirdFunction(); // ###php-mode-test### ((indent 4))
+
+$result = DateTime::createFromFormat('Y-m-d', '2112-09-03') // ###php-mode-test### ((indent 0))
+ ->someFunction(); // ###php-mode-test### ((indent 4))
+
+$pages = $dbOld->createQueryBuilder() // ###php-mode-test### ((indent 0))
+ ->select('*'); // ###php-mode-test### ((indent 4))
diff --git a/tests/issue-136.php.faces b/tests/issue-136.php.faces
index 538cdd97..0e5d6b71 100644
--- a/tests/issue-136.php.faces
+++ b/tests/issue-136.php.faces
@@ -103,8 +103,8 @@
("$" . php-variable-sigil)
("name" . php-variable-name)
(")\n {\n ")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("name" . php-property-name)
(" = ")
diff --git a/tests/issue-197.php.faces b/tests/issue-197.php.faces
index 94f2abef..85469d9d 100644
--- a/tests/issue-197.php.faces
+++ b/tests/issue-197.php.faces
@@ -21,10 +21,10 @@
("$" . php-variable-sigil)
("test" . php-variable-name)
("->" . php-object-op)
- ("int" . php-method-call)
+ ("int" . php-method-call-traditional)
("();\n")
("$" . php-variable-sigil)
("test" . php-variable-name)
("->" . php-object-op)
- ("string" . php-method-call)
+ ("string" . php-method-call-traditional)
("();\n"))
diff --git a/tests/issue-201.php.faces b/tests/issue-201.php.faces
index 7cd5f111..5c3ccda8 100644
--- a/tests/issue-201.php.faces
+++ b/tests/issue-201.php.faces
@@ -8,21 +8,21 @@
("\n\n")
("// " . font-lock-comment-delimiter-face)
("Start:\n" . font-lock-comment-face)
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
(";\n")
("$" . php-variable-sigil)
("that" . php-variable-name)
(";\n")
("self" . php-keyword)
("::" . php-paamayim-nekudotayim)
- ("test" . php-static-method-call)
+ ("test" . php-static-method-call-traditional)
("();\n")
("static" . php-keyword)
("::" . php-paamayim-nekudotayim)
- ("test" . php-static-method-call)
+ ("test" . php-static-method-call-traditional)
("();\n")
("parent" . php-keyword)
("::" . php-paamayim-nekudotayim)
- ("test" . php-static-method-call)
+ ("test" . php-static-method-call-traditional)
("();\n"))
diff --git a/tests/issue-439.php.faces b/tests/issue-439.php.faces
index 595bcbab..bc3094e6 100644
--- a/tests/issue-439.php.faces
+++ b/tests/issue-439.php.faces
@@ -52,7 +52,7 @@
(" ")
("<<<\"いろは\"\nLet'go Justin\nいろは" . php-string)
(";\n\n")
- ("var_dump" . php-function-call)
+ ("var_dump" . php-function-call-traditional)
("(")
("<<<\"ABC\"\nLet'go Justin\nABC" . php-string)
(");\n\n")
@@ -60,7 +60,7 @@
(" (1 ")
("===" . php-comparison-op)
(" 1) {\n ")
- ("var_dump" . php-function-call)
+ ("var_dump" . php-function-call-traditional)
("(")
("<<<\"ABC\"\n Let'go Justin\n ABC" . php-string)
(");\n}\n"))
diff --git a/tests/lang/class/anonymous-class.php.faces b/tests/lang/class/anonymous-class.php.faces
index 415bcaa2..bd0df9ce 100644
--- a/tests/lang/class/anonymous-class.php.faces
+++ b/tests/lang/class/anonymous-class.php.faces
@@ -17,7 +17,7 @@
("// " . font-lock-comment-delimiter-face)
("###php-mode-test### ((indent 4))\n" . font-lock-comment-face)
("};\n\n")
- ("is_object" . php-function-call)
+ ("is_object" . php-function-call-traditional)
("(1, ")
("new" . php-keyword)
(" ")
diff --git a/tests/lang/doc-comment/comments.php.24.faces b/tests/lang/doc-comment/comments.php.24.faces
index 593bb49e..06f70485 100644
--- a/tests/lang/doc-comment/comments.php.24.faces
+++ b/tests/lang/doc-comment/comments.php.24.faces
@@ -105,8 +105,8 @@
("$" . php-variable-sigil)
("name" . php-variable-name)
(")\n {\n ")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("name" . php-property-name)
(" ")
@@ -134,7 +134,7 @@
(" ")
("=" . php-assignment-op)
(" ")
- ("hoge" . php-function-call)
+ ("hoge" . php-function-call-traditional)
("();\n\n ")
("// " . font-lock-comment-delimiter-face)
("one-line comment\n" . font-lock-comment-face)
diff --git a/tests/lang/doc-comment/comments.php.27.faces b/tests/lang/doc-comment/comments.php.27.faces
index 8b3b78e5..70c23fb3 100644
--- a/tests/lang/doc-comment/comments.php.27.faces
+++ b/tests/lang/doc-comment/comments.php.27.faces
@@ -106,8 +106,8 @@
("$" . php-variable-sigil)
("name" . php-variable-name)
(")\n {\n ")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("name" . php-property-name)
(" ")
@@ -135,7 +135,7 @@
(" ")
("=" . php-assignment-op)
(" ")
- ("hoge" . php-function-call)
+ ("hoge" . php-function-call-traditional)
("();\n\n ")
("// " . font-lock-comment-delimiter-face)
("one-line comment\n" . font-lock-comment-face)
diff --git a/tests/lang/doc-comment/comments.php.faces b/tests/lang/doc-comment/comments.php.faces
index 593bb49e..06f70485 100644
--- a/tests/lang/doc-comment/comments.php.faces
+++ b/tests/lang/doc-comment/comments.php.faces
@@ -105,8 +105,8 @@
("$" . php-variable-sigil)
("name" . php-variable-name)
(")\n {\n ")
- ("$" . php-$this-sigil)
- ("this" . php-$this)
+ ("$" . php-this-sigil)
+ ("this" . php-this)
("->" . php-object-op)
("name" . php-property-name)
(" ")
@@ -134,7 +134,7 @@
(" ")
("=" . php-assignment-op)
(" ")
- ("hoge" . php-function-call)
+ ("hoge" . php-function-call-traditional)
("();\n\n ")
("// " . font-lock-comment-delimiter-face)
("one-line comment\n" . font-lock-comment-face)
diff --git a/tests/lang/function/calls.php.faces b/tests/lang/function/calls.php.faces
index 19d681c5..7713374a 100644
--- a/tests/lang/function/calls.php.faces
+++ b/tests/lang/function/calls.php.faces
@@ -9,73 +9,73 @@
("foo" . php-variable-name)
(")) {\n 1")
("+" . php-arithmetic-op)
- ("bar" . php-function-call)
+ ("bar" . php-function-call-traditional)
("()+")
- ("foo" . php-function-call)
+ ("foo" . php-function-call-traditional)
("();\n}\n\n")
("$" . php-variable-sigil)
("foo" . php-variable-name)
("->" . php-object-op)
- ("string" . php-method-call)
+ ("string" . php-method-call-traditional)
("();\n")
("$" . php-variable-sigil)
("foo" . php-variable-name)
("->" . php-object-op)
- ("isset" . php-method-call)
+ ("isset" . php-method-call-traditional)
("();\n\n\n")
("$" . php-variable-sigil)
("a" . php-variable-name)
("->" . php-object-op)
- ("b" . php-method-call)
+ ("b" . php-method-call-traditional)
("();\n")
("$" . php-variable-sigil)
("a" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("a" . php-function-call)
+ ("a" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("aaa" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("aaa" . php-function-call)
+ ("aaa" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("_aa" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("_aa" . php-function-call)
+ ("_aa" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("a_a" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("a_a" . php-function-call)
+ ("a_a" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("aa_" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("aa_" . php-function-call)
+ ("aa_" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("a1c" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("a1c" . php-function-call)
+ ("a1c" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("あ" . php-variable-name)
(" ")
("=" . php-assignment-op)
(" ")
- ("あ" . php-function-call)
+ ("あ" . php-function-call-traditional)
("();\n")
("$" . php-variable-sigil)
("_a" . php-variable-name)
diff --git a/tests/lang/function/closure.php.faces b/tests/lang/function/closure.php.faces
index 1d671f72..9bf83b50 100644
--- a/tests/lang/function/closure.php.faces
+++ b/tests/lang/function/closure.php.faces
@@ -1,7 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("" . php-object-op)
- ("funCall" . php-method-call)
+ ("funCall" . php-method-call-traditional)
("();\n"))