diff -Nru php-elisp-1.22.1/Cask php-elisp-1.22.2/Cask --- php-elisp-1.22.1/Cask 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/Cask 2019-12-23 16:36:19.000000000 +0000 @@ -1,4 +1,4 @@ -(package "php-mode" "1.22.1" "Major mode for editing PHP code") +(package "php-mode" "1.22.2" "Major mode for editing PHP code") (source melpa) (package-file "php.el") diff -Nru php-elisp-1.22.1/CHANGELOG.md php-elisp-1.22.2/CHANGELOG.md --- php-elisp-1.22.1/CHANGELOG.md 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/CHANGELOG.md 2019-12-23 16:36:19.000000000 +0000 @@ -8,6 +8,43 @@ * Drop support for Emacs 24 and 25.1 +## [1.22.2] - 2019-12-23 + +A face has been added for coloring PHP syntax. Thank you [@minikN]! + +This release is a minor modified version of the 1.22.x series. +PHP Mode 2.0 is planned to be released in January 2020. + +### Added + + * Add `php-project-etags-file` and `php-project-apply-local-variables` ([#591]) + * Add `php-find-system-php-ini-file` and `php-ini` command ([#593]) + +### Changed + + * Improve PHP syntax highlighting (by [@minikN]) + * Add support for multiple operators ([#594]) + * Add `=>` to assignment operators ([#602], [#603]) + * Plain faces no longer inherit `default` ([#597]) + +### Removed + + * Remove `php-mode-modified` variable ([#590]) + +### Fixed + + * Fix anonymous class indentation ([#598]) + +[@minikN]: https://github.com/minikN +[#590]: https://github.com/emacs-php/php-mode/pull/590 +[#591]: https://github.com/emacs-php/php-mode/pull/591 +[#593]: https://github.com/emacs-php/php-mode/pull/593 +[#594]: https://github.com/emacs-php/php-mode/pull/594 +[#597]: https://github.com/emacs-php/php-mode/pull/597 +[#598]: https://github.com/emacs-php/php-mode/pull/598 +[#602]: https://github.com/emacs-php/php-mode/pull/602 +[#603]: https://github.com/emacs-php/php-mode/pull/603 + ## [1.22.1] - 2019-11-10 This release is a minor modified version of the 1.22.x series. diff -Nru php-elisp-1.22.1/debian/changelog php-elisp-1.22.2/debian/changelog --- php-elisp-1.22.1/debian/changelog 2019-11-17 21:52:36.000000000 +0000 +++ php-elisp-1.22.2/debian/changelog 2019-12-31 18:08:18.000000000 +0000 @@ -1,3 +1,9 @@ +php-elisp (1.22.2-1) unstable; urgency=medium + + * New upstream release. + + -- Nicholas D Steeves Tue, 31 Dec 2019 13:08:18 -0500 + php-elisp (1.22.1-2) unstable; urgency=medium * Do source-only upload so package can migrate to testing. diff -Nru php-elisp-1.22.1/.github/workflows/test.yml php-elisp-1.22.2/.github/workflows/test.yml --- php-elisp-1.22.1/.github/workflows/test.yml 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/.github/workflows/test.yml 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,38 @@ +name: CI + +on: + push: + paths-ignore: + - '**/*.md' + - 'etc/*' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + emacs_version: + - "24.4" + - "24.5" + - "25.1" + - "25.2" + - "25.3" + - "26.1" + - "26.2" + - "26.3" + - snapshot + include: + - emacs_version: snapshot + allow_failure: true + steps: + - uses: purcell/setup-emacs@master + with: + version: ${{ matrix.emacs_version }} + + - uses: actions/checkout@v1 + - name: Run tests + if: matrix.allow_failure != true + run: 'make test' + - name: Run tests (allow failure) + if: matrix.allow_failure == true + run: 'make test || true' diff -Nru php-elisp-1.22.1/php.el php-elisp-1.22.2/php.el --- php-elisp-1.22.1/php.el 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/php.el 2019-12-23 16:36:19.000000000 +0000 @@ -4,7 +4,7 @@ ;; Author: USAMI Kenta ;; Created: 5 Dec 2018 -;; Version: 1.22.1 +;; Version: 1.22.2 ;; Keywords: languages, php ;; Homepage: https://github.com/emacs-php/php-mode ;; Package-Requires: ((emacs "24.3")) @@ -413,5 +413,41 @@ (if (called-interactively-p 'interactive) #'display-buffer #'get-buffer) (format "*%s*" buf-name)))) +(defun php-ini () + "Get `php --ini' output buffer." + (interactive) + (let ((buffer (get-buffer-create " *php --ini*"))) + (with-current-buffer buffer + (view-mode -1) + (read-only-mode -1) + (erase-buffer) + (shell-command (concat php-executable " --ini") buffer) + (view-mode +1)) + (if (called-interactively-p 'interactive) + (pop-to-buffer buffer) + buffer))) + +;;;###autoload +(defun php-find-system-php-ini-file (&optional file) + "Find php.ini FILE by `php --ini'." + (interactive + (list + (let* ((default-directory (expand-file-name "~")) + (buffer (php-ini)) + (path (with-current-buffer buffer + (goto-char (point-min)) + (save-match-data + (when (re-search-forward ": \\(.+?\\)$" nil nil) + (match-string 1)))))) + (when (or (null path) (not (file-directory-p path))) + (when (called-interactively-p 'interactive) + (pop-to-buffer buffer)) + (user-error "Failed get path to PHP ini files directory")) + (read-file-name "Find php.ini file: " + (concat (expand-file-name path) "/") + nil nil nil + #'file-exists-p)))) + (find-file file)) + (provide 'php) ;;; php.el ends here diff -Nru php-elisp-1.22.1/php-face.el php-elisp-1.22.2/php-face.el --- php-elisp-1.22.1/php-face.el 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/php-face.el 2019-12-23 16:36:19.000000000 +0000 @@ -4,7 +4,7 @@ ;; Author: USAMI Kenta ;; Created: 5 May 2019 -;; Version: 1.22.1 +;; Version: 1.22.2 ;; Keywords: faces, php ;; Homepage: https://github.com/emacs-php/php-mode ;; Package-Requires: ((emacs "24.3")) @@ -56,7 +56,7 @@ :group 'php-faces :tag "PHP Function Name") -(defface php-function-call '((t (:inherit default))) +(defface php-function-call '((t ())) "PHP Mode face used to highlight function names in calles." :group 'php-faces :tag "PHP Function Call") @@ -81,17 +81,52 @@ :group 'php-faces :tag "PHP Property Name") -(defface php-variable-sigil '((t (:inherit default))) +(defface php-variable-sigil '((t ())) "PHP Mode face used to highlight variable sigils ($)." :group 'php-faces :tag "PHP Variable Sigil") -(defface php-object-op '((t (:inherit default))) +(defface php-operator '((t ())) + "PHP Mode face used to operators." + :group 'php-faces + :tag "PHP Operator") + +(defface php-assignment-op '((t (:inherit php-operator))) + "PHP Mode face used to assignment operators (=, +=, ...)." + :group 'php-faces + :tag "PHP Object Op") + +(defface php-comparison-op '((t (:inherit php-operator))) + "PHP Mode face used to comparison operators (==, !=, ===, ...)." + :group 'php-faces + :tag "PHP Comparison Op") + +(defface php-logical-op '((t (:inherit php-operator))) + "PHP Mode face used to logical operators (&&, ||, ?:)." + :group 'php-faces + :tag "PHP Logical Op") + +(defface php-arithmetic-op '((t (:inherit php-operator))) + "PHP Mode face used to arithmetic operators (+, -, %, ...)." + :group 'php-faces + :tag "PHP Arithmetic Op") + +(defface php-inc-dec-op '((t (:inherit php-operator))) + "PHP Mode face used to increment and decremt operators (--, ++)." + :group 'php-faces + :tag "PHP Increment/Decrement Op") + +(defface php-string-op '((t (:inherit php-operator))) + "PHP Mode face used to logical operators (.)." + :group 'php-faces + :tag "PHP String Op") + +(defface php-object-op '((t (:inherit php-operator))) "PHP Mode face used to object operators (->)." :group 'php-faces :tag "PHP Object Op") -(defface php-paamayim-nekudotayim '((t (:inherit default))) +(defface php-paamayim-nekudotayim '((t ())) "PHP Mode face used to highlight \"Paamayim Nekudotayim\" scope resolution operators (::)." :group 'php-faces :tag "PHP Paamayim Nekudotayim") @@ -131,7 +166,7 @@ :group 'php-faces :tag "PHP $this Sigil") -(defface php-errorcontrol-op '((t (:inherit font-lock-type-face))) +(defface php-errorcontrol-op '((t (:inherit font-lock-type-face))) "PHP Mode face used to highlight errorcontrol operators (@).." :group 'php-faces :tag "PHP ErrorControl Op") diff -Nru php-elisp-1.22.1/php-mode-debug.el php-elisp-1.22.2/php-mode-debug.el --- php-elisp-1.22.1/php-mode-debug.el 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/php-mode-debug.el 2019-12-23 16:36:19.000000000 +0000 @@ -5,7 +5,7 @@ ;; Author: USAMI Kenta ;; URL: https://github.com/emacs-php/php-mode ;; Keywords: maint -;; Version: 1.22.1 +;; Version: 1.22.2 ;; Package-Requires: ((emacs "24.3")) ;; License: GPL-3.0-or-later diff -Nru php-elisp-1.22.1/php-mode.el php-elisp-1.22.2/php-mode.el --- php-elisp-1.22.1/php-mode.el 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/php-mode.el 2019-12-23 16:36:19.000000000 +0000 @@ -9,16 +9,13 @@ ;; Maintainer: USAMI Kenta ;; URL: https://github.com/emacs-php/php-mode ;; Keywords: languages php -;; Version: 1.22.1 +;; Version: 1.22.2 ;; Package-Requires: ((emacs "24.3")) ;; License: GPL-3.0-or-later -(defconst php-mode-version-number "1.22.1" +(defconst php-mode-version-number "1.22.2" "PHP Mode version number.") -(defconst php-mode-modified "2019-11-10" - "PHP Mode build date.") - ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or @@ -195,7 +192,10 @@ :type 'boolean) (defcustom php-mode-page-delimiter - (eval-when-compile (rx symbol-start (or "namespace" "function" "class" "trait" "interface") symbol-end)) + (eval-when-compile + (rx symbol-start + (or "namespace" "function" "class" "trait" "interface") + symbol-end)) "Regexp describing line-beginnings that PHP declaration statements." :group 'php-mode :tag "PHP Mode Page Delimiter" @@ -340,15 +340,27 @@ "When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')." :group 'php-mode :tag "PHP Mode Disable C Mode Hook" - :type 'boolean - :group 'php-mode) + :type 'boolean) + +(defcustom php-mode-enable-project-local-variable t + "When set to `T', apply project local variable to buffer local variable." + :group 'php-mode + :tag "PHP Mode Enable Project Local Variable" + :type 'boolean) (defun php-mode-version () "Display string describing the version of PHP Mode." (interactive) - (funcall - (if (called-interactively-p 'interactive) #'message #'format) - "PHP Mode %s of %s" php-mode-version-number php-mode-modified)) + (let ((fmt + (eval-when-compile + (let ((id "$Id$")) + (concat "PHP Mode %s" + (if (string= id (concat [?$ ?I ?d ?$])) + "" + (concat " " id))))))) + (funcall + (if (called-interactively-p 'interactive) #'message #'format) + fmt php-mode-version-number))) ;;;###autoload (define-obsolete-variable-alias 'php-available-project-root-files 'php-project-available-root-files "1.19.0") @@ -653,11 +665,10 @@ (eq 'arglist-cont-nonempty (car langelem))) (save-excursion (save-match-data - (when (and (re-search-backward php-mode--re-return-typed-closure (cdr langelem) t) - (progn - (goto-char (match-data 1)) - (not (php-in-string-or-comment-p)))) - (setq in-return-typed-closure t))))) + (when (re-search-backward php-mode--re-return-typed-closure (cdr langelem) t) + (goto-char (match-beginning 1)) + (when (not (php-in-string-or-comment-p)) + (setq in-return-typed-closure t)))))) (unless in-return-typed-closure (c-lineup-arglist langelem)))) @@ -677,6 +688,7 @@ (case-label . +) (class-open . 0) (comment-intro . 0) + (inexpr-class . 0) (inlambda . 0) (inline-open . 0) (namespace-open . 0) @@ -1111,6 +1123,11 @@ (php-set-style (symbol-name coding-style))) (remove-hook 'hack-local-variables-hook #'php-mode-set-style-delay))))) +(defun php-mode-set-local-variable-delay () + "Set local variable from php-project." + (php-project-apply-local-variables) + (remove-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay)) + (defvar php-mode-syntax-table (let ((table (make-syntax-table))) (c-populate-syntax-table table) @@ -1164,6 +1181,9 @@ ;; PHP vars are case-sensitive (setq case-fold-search t) + (when php-mode-enable-project-local-variable + (add-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay t t)) + ;; When php-mode-enable-project-coding-style is set, it is delayed by hook. ;; Since it depends on the timing at which the file local variable is set. ;; File local variables are set after initialization of major mode except `run-hook' is complete. @@ -1524,6 +1544,9 @@ ("\\(->\\)\\(\\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)) ("\\(\\$+\\)\\(\\sw+\\)" (1 'php-variable-sigil) (2 'php-variable-name)) @@ -1591,6 +1614,8 @@ ;; is usually overkill. `( ("\\<\\(@\\)" 1 'php-errorcontrol-op) + ;; Highlight function calls + ("\\(\\_<\\(?:\\sw\\|\\s_\\)+?\\_>\\)\\s-*(" 1 'php-function-call) ;; Highlight all upper-cased symbols as constant ("\\<\\([A-Z_][A-Z0-9_]+\\)\\>" 1 'php-constant) @@ -1630,7 +1655,23 @@ ("\\?\\(\\(:?\\sw\\|\\s_\\)+\\)\\s-+\\$" 1 font-lock-type-face) ("function.+:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)" 1 font-lock-type-face) (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face) - )) + + ;; Assignment operators (=, +=, ...) + ("\\([^=]+?\\([\-+./%]?=\\)[^==, ...) + ("\\([!=]=\\{1,2\\}[>]?\\|[<>]=?\\)" 1 'php-comparison-op) + + ;; Arithmetic operators (+, -, *, **, /, %) + ("\\(?:[A-Za-z0-9[:blank:]]\\)\\([\-+*/%]\\*?\\)\\(?:[A-Za-z0-9[:blank:]]\\)" 1 'php-arithmetic-op) + + ;; Increment and Decrement operators (++, --) + ("\\(\-\-\\|\+\+\\)\$\\w+" 1 'php-inc-dec-op) ;; pre inc/dec + ("\$\\w+\\(\-\-\\|\+\+\\)" 1 'php-inc-dec-op) ;; post inc/dec + + ;; Logical operators (and, or, &&, ...) + ;; Not operator (!) is defined in "before cc-mode" section above. + ("\\(&&\\|||\\)" 1 'php-logical-op))) "Detailed highlighting for PHP Mode.") (defvar php-font-lock-keywords php-font-lock-keywords-3 diff -Nru php-elisp-1.22.1/php-project.el php-elisp-1.22.2/php-project.el --- php-elisp-1.22.1/php-project.el 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/php-project.el 2019-12-23 16:36:19.000000000 +0000 @@ -5,7 +5,7 @@ ;; Author: USAMI Kenta ;; Keywords: tools, files ;; URL: https://github.com/emacs-php/php-mode -;; Version: 1.22.1 +;; Version: 1.22.2 ;; Package-Requires: ((emacs "24.3")) ;; License: GPL-3.0-or-later @@ -72,6 +72,19 @@ ;; Constants (defconst php-project-composer-autoloader "vendor/autoload.php") +;; Custom variables +(defgroup php-project nil + "Major mode for editing PHP code." + :tag "PHP Project" + :prefix "php-project-" + :group 'php) + +(defcustom php-project-auto-detect-etags-file nil + "If `T', automatically detect etags file when file is opened." + :tag "PHP Project Auto Detect Etags File" + :group 'php-project + :type 'boolean) + ;; Variables (defvar php-project-available-root-files '((projectile ".projectile") @@ -104,6 +117,12 @@ (put 'php-project-root 'safe-local-variable #'(lambda (v) (or (stringp v) (assq v php-project-available-root-files)))) + (defvar-local php-project-etags-file nil) + (put 'php-project-etags-file 'safe-local-variable + #'(lambda (v) (or (functionp v) + (eq v t) + (php-project--eval-bootstrap-scripts v)))) + (defvar-local php-project-bootstrap-scripts nil "List of path to bootstrap php script file. @@ -172,7 +191,6 @@ (put 'php-project-server-start 'safe-local-variable #'(lambda (v) (or (functionp v) (php-project--eval-bootstrap-scripts v))))) - ;; Functions (defun php-project--validate-php-file-as-template (val) @@ -229,6 +247,17 @@ (t (prog1 nil (warn "php-project-php-file-as-template is unexpected format"))))) +(defun php-project-apply-local-variables () + "Apply php-project variables to local variables." + (when (null tags-file-name) + (when (or (and php-project-auto-detect-etags-file + (null php-project-etags-file)) + (eq php-project-etags-file t)) + (let ((tags-file (expand-file-name "TAGS" (php-project-get-root-dir)))) + (when (file-exists-p tags-file) + (setq-local php-project-etags-file tags-file)))) + (when php-project-etags-file + (setq-local tags-file-name (php-project--eval-bootstrap-scripts php-project-etags-file))))) ;;;###autoload (defun php-project-get-bootstrap-scripts () "Return list of bootstrap script." diff -Nru php-elisp-1.22.1/README.ja.md php-elisp-1.22.2/README.ja.md --- php-elisp-1.22.1/README.ja.md 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/README.ja.md 2019-12-23 16:36:19.000000000 +0000 @@ -1,10 +1,9 @@ -PHP Mode for GNU Emacs -====================== +# Emacs PHP Mode [![Emacs: 26.3](https://img.shields.io/badge/Emacs-26.3-blue.svg)](https://www.gnu.org/software/emacs/) [![lang: PHP 7](https://img.shields.io/badge/lang-PHP%207-brightgreen.svg)](http://php.net/manual/migration70.php) [![lang: PHP 5](https://img.shields.io/badge/lang-PHP%205-green.svg)](http://php.net/downloads.php) -[![travis badge][travis-badge]][travis-link] +[![Build Status](https://github.com/emacs-php/php-mode/workflows/CI/badge.svg)](https://github.com/emacs-php/php-mode/actions) [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link] [![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt) diff -Nru php-elisp-1.22.1/README.md php-elisp-1.22.2/README.md --- php-elisp-1.22.1/README.md 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/README.md 2019-12-23 16:36:19.000000000 +0000 @@ -1,10 +1,9 @@ -PHP Mode for GNU Emacs -====================== +# Emacs PHP Mode [![Emacs: 26.3](https://img.shields.io/badge/Emacs-26.3-blue.svg)](https://www.gnu.org/software/emacs/) [![lang: PHP 7](https://img.shields.io/badge/lang-PHP%207-brightgreen.svg)](http://php.net/manual/migration70.php) [![lang: PHP 5](https://img.shields.io/badge/lang-PHP%205-green.svg)](http://php.net/downloads.php) -[![travis badge][travis-badge]][travis-link] +[![Build Status](https://github.com/emacs-php/php-mode/workflows/CI/badge.svg)](https://github.com/emacs-php/php-mode/actions) [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link] [![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt) @@ -451,6 +450,4 @@ [php-mode]: https://github.com/emacs-php/php-mode [php-mode releases]: https://github.com/emacs-php/php-mode/releases [php-suite]: https://github.com/emacs-php/php-suite -[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg -[travis-link]: https://travis-ci.org/emacs-php/php-mode [wiki]: https://github.com/emacs-php/php-mode/wiki diff -Nru php-elisp-1.22.1/tests/7.4/arrow-function.php.faces php-elisp-1.22.2/tests/7.4/arrow-function.php.faces --- php-elisp-1.22.1/tests/7.4/arrow-function.php.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/7.4/arrow-function.php.faces 2019-12-23 16:36:19.000000000 +0000 @@ -11,54 +11,82 @@ ("\n\n") ("$" . php-variable-sigil) ("fn1" . php-variable-name) - (" = ") + (" ") + ("=" . php-assignment-op) + (" ") ("fn" . php-keyword) ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") => ") + (") ") + ("=" . php-assignment-op) + (">" . php-comparison-op) + (" ") ("$" . php-variable-sigil) ("x" . php-variable-name) - (" + ") + (" ") + ("+" . php-arithmetic-op) + (" ") ("$" . php-variable-sigil) ("y" . php-variable-name) (";\n\n") ("$" . php-variable-sigil) ("fn2" . php-variable-name) - (" = [\n ") + (" ") + ("=" . php-assignment-op) + (" [\n ") ("fn" . php-keyword) ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") => ") + (") ") + ("=" . php-assignment-op) + (">" . php-comparison-op) + (" ") ("$" . php-variable-sigil) ("x" . php-variable-name) - (" + ") + (" ") + ("+" . php-arithmetic-op) + (" ") ("$" . php-variable-sigil) ("y" . php-variable-name) ("\n];\n\n") ("$" . php-variable-sigil) ("z" . php-variable-name) - (" = 1;\n") + (" ") + ("=" . php-assignment-op) + (" 1;\n") ("$" . php-variable-sigil) ("fn3" . php-variable-name) - (" = ") + (" ") + ("=" . php-assignment-op) + (" ") ("fn" . php-keyword) ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") => ") + (") ") + ("=" . php-assignment-op) + (">" . php-comparison-op) + (" ") ("fn" . php-keyword) ("(") ("$" . php-variable-sigil) ("y" . php-variable-name) - (") => ") + (") ") + ("=" . php-assignment-op) + (">" . php-comparison-op) + (" ") ("$" . php-variable-sigil) ("x" . php-variable-name) - (" * ") + (" ") + ("*" . php-arithmetic-op) + (" ") ("$" . php-variable-sigil) ("y" . php-variable-name) - (" + ") + (" ") + ("+" . php-arithmetic-op) + (" ") ("$" . php-variable-sigil) ("z" . php-variable-name) (";\n")) diff -Nru php-elisp-1.22.1/tests/7.4/typed-property.php.faces php-elisp-1.22.2/tests/7.4/typed-property.php.faces --- php-elisp-1.22.1/tests/7.4/typed-property.php.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/7.4/typed-property.php.faces 2019-12-23 16:36:19.000000000 +0000 @@ -1,32 +1,24 @@ ;; -*- mode: emacs-lisp -*- (("" . php-object-op) ("string" . php-property-name) - (" = ") + (" ") + ("=" . php-assignment-op) + (" ") ("$" . php-variable-sigil) ("var" . php-variable-name) - ("; - } - - ") + (";\n }\n\n ") ("public" . php-keyword) (" ") ("function" . php-keyword) (" ") ("print" . php-function-name) - ("() - { - var_dump(") + ("()\n {\n ") + ("var_dump" . php-function-call) + ("(") ("$" . php-$this-sigil) ("this" . php-$this) ("->" . php-object-op) ("string" . php-property-name) - ("); - } -} - -(") + (");\n }\n}\n\n(") ("new" . php-keyword) (" ") ("Typed" . font-lock-type-face) (")") ("->" . php-object-op) ("print" . php-method-call) - ("(); -")) + ("();\n")) diff -Nru php-elisp-1.22.1/tests/annotation.php php-elisp-1.22.2/tests/annotation.php --- php-elisp-1.22.1/tests/annotation.php 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/annotation.php 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - * @link https://github.com/emacs-php/php-mode - * @package Emacs\PHPMode - */ - -// one-line comment -// @annotation This is NOT annotation. 1 - -/*------------------------------------------------ - Multi-line comment - - * @annotation This is NOT annotation. 2 - -------------------------------------------------*/ - -// /** -// * Comment outed class implementation -// * -// * @annotation This is NOT annotation. 3 -// */ -// class CommentOuted -// { -// } - -/** - * Class level doc-comment - * - * Description {@internal Description} inline tag. - * - * @property-read string[] $name - * @ORM\Table(name="majormodes") - * @ORM\Entity(repositoryClass="Emacs\Repository\MajorModeRepository") - */ -final class SampleClass -{ - /** Const doc-comment */ - const SAMPLE = 'SAMPLE'; - /** @var string sample property doc-comment */ - private $name; - - /** - * @param string $name - */ - public function __construct($name) - { - $this->name = $name; // comment in after code - - /** @var string|bool|array[]|ArrayObject */ - $foo = hoge(); - - // one-line comment - // @annotation This is NOT annotation. 4 - - /** @var int internal linter variable */ - $offset = 0; - } - - /** - * Summary - * - * @throws \RuntimeException - */ - public function test() - { - throw new \RuntimeException; - } -} diff -Nru php-elisp-1.22.1/tests/comments.php.24.faces php-elisp-1.22.2/tests/comments.php.24.faces --- php-elisp-1.22.1/tests/comments.php.24.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/comments.php.24.faces 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -;; -*- mode: emacs-lisp -*- -(("\n * " . font-lock-doc-face) - ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@package" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("Emacs\\PHPMode" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) - ("\n") - ("/*" . font-lock-comment-delimiter-face) - ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------*/" . font-lock-comment-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("/**\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* Comment outed class implementation\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*/\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("class CommentOuted\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("{\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("}\n" . font-lock-comment-face) - ("\n") - ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) - ("{@internal " php-doc-annotation-tag font-lock-doc-face) - ("Description" php-string php-doc-annotation-tag font-lock-doc-face) - ("}" php-doc-annotation-tag font-lock-doc-face) - (" inline tag.\n *\n * " . font-lock-doc-face) - ("@property-read" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("[]" php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) - ("(name=\"majormodes\")\n * " . font-lock-doc-face) - ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) - ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) - ("\n") - ("final" . php-keyword) - (" ") - ("class" . php-keyword) - (" ") - ("SampleClass" . font-lock-type-face) - ("\n{\n ") - ("/** Const doc-comment */" . font-lock-doc-face) - ("\n ") - ("const" . php-keyword) - (" ") - ("SAMPLE" . php-constant-assign) - (" = ") - ("'SAMPLE'" . php-string) - (";\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" sample property doc-comment */" . font-lock-doc-face) - ("\n ") - ("private" . php-keyword) - (" ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (";\n\n ") - ("/**\n * " . font-lock-doc-face) - ("@param" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("__construct" . php-function-name) - ("(") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (")\n {\n ") - ("$" . php-$this-sigil) - ("this" . php-$this) - ("->" . php-object-op) - ("name" . php-property-name) - (" = ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - ("; ") - ("// " . font-lock-comment-delimiter-face) - ("comment in after code\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("bool" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("array" font-lock-type-face php-string font-lock-doc-face) - ("[]|ArrayObject" php-string font-lock-doc-face) - (" */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("foo" . php-variable-name) - (" = hoge();\n\n ") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - (" ") - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("int" font-lock-type-face php-string font-lock-doc-face) - (" internal linter variable */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("offset" . php-variable-name) - (" = 0;\n }\n\n ") - ("/**\n * Summary\n *\n * " . font-lock-doc-face) - ("@throws" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("\\RuntimeException" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("test" . php-function-name) - ("()\n {\n ") - ("throw" . php-keyword) - (" ") - ("new" . php-keyword) - (" ") - ("\\RuntimeException" . font-lock-type-face) - (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/comments.php.27.faces php-elisp-1.22.2/tests/comments.php.27.faces --- php-elisp-1.22.1/tests/comments.php.27.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/comments.php.27.faces 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ -;; -*- mode: emacs-lisp -*- -(("\n * " . font-lock-doc-face) - ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@package" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("Emacs\\PHPMode" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) - ("\n") - ("/*" . font-lock-comment-delimiter-face) - ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------" . font-lock-comment-face) - ("*/" . font-lock-comment-delimiter-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("/**\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* Comment outed class implementation\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*/\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("class CommentOuted\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("{\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("}\n" . font-lock-comment-face) - ("\n") - ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) - ("{@internal " php-doc-annotation-tag font-lock-doc-face) - ("Description" php-string php-doc-annotation-tag font-lock-doc-face) - ("}" php-doc-annotation-tag font-lock-doc-face) - (" inline tag.\n *\n * " . font-lock-doc-face) - ("@property-read" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("[]" php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) - ("(name=\"majormodes\")\n * " . font-lock-doc-face) - ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) - ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) - ("\n") - ("final" . php-keyword) - (" ") - ("class" . php-keyword) - (" ") - ("SampleClass" . font-lock-type-face) - ("\n{\n ") - ("/** Const doc-comment */" . font-lock-doc-face) - ("\n ") - ("const" . php-keyword) - (" ") - ("SAMPLE" . font-lock-type-face) - (" = ") - ("'SAMPLE'" . php-string) - (";\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" sample property doc-comment */" . font-lock-doc-face) - ("\n ") - ("private" . php-keyword) - (" ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (";\n\n ") - ("/**\n * " . font-lock-doc-face) - ("@param" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("__construct" . php-function-name) - ("(") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (")\n {\n ") - ("$" . php-$this-sigil) - ("this" . php-$this) - ("->" . php-object-op) - ("name" . php-property-name) - (" = ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - ("; ") - ("// " . font-lock-comment-delimiter-face) - ("comment in after code\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("bool" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("array" font-lock-type-face php-string font-lock-doc-face) - ("[]|ArrayObject" php-string font-lock-doc-face) - (" */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("foo" . php-variable-name) - (" = hoge();\n\n ") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - (" ") - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("int" font-lock-type-face php-string font-lock-doc-face) - (" internal linter variable */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("offset" . php-variable-name) - (" = 0;\n }\n\n ") - ("/**\n * Summary\n *\n * " . font-lock-doc-face) - ("@throws" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("\\RuntimeException" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("test" . php-function-name) - ("()\n {\n ") - ("throw" . php-keyword) - (" ") - ("new" . php-keyword) - (" ") - ("\\RuntimeException" . font-lock-type-face) - (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/comments.php.faces php-elisp-1.22.2/tests/comments.php.faces --- php-elisp-1.22.1/tests/comments.php.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/comments.php.faces 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -;; -*- mode: emacs-lisp -*- -(("\n * " . font-lock-doc-face) - ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@package" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("Emacs\\PHPMode" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) - ("\n") - ("/*" . font-lock-comment-delimiter-face) - ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------*/" . font-lock-comment-face) - ("\n\n") - ("// " . font-lock-comment-delimiter-face) - ("/**\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* Comment outed class implementation\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("*/\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("class CommentOuted\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("{\n" . font-lock-comment-face) - ("// " . font-lock-comment-delimiter-face) - ("}\n" . font-lock-comment-face) - ("\n") - ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) - ("{@internal " php-doc-annotation-tag font-lock-doc-face) - ("Description" php-string php-doc-annotation-tag font-lock-doc-face) - ("}" php-doc-annotation-tag font-lock-doc-face) - (" inline tag.\n *\n * " . font-lock-doc-face) - ("@property-read" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("[]" php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n * " . font-lock-doc-face) - ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) - ("(name=\"majormodes\")\n * " . font-lock-doc-face) - ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) - ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) - ("\n") - ("final" . php-keyword) - (" ") - ("class" . php-keyword) - (" ") - ("SampleClass" . font-lock-type-face) - ("\n{\n ") - ("/** Const doc-comment */" . font-lock-doc-face) - ("\n ") - ("const" . php-keyword) - (" ") - ("SAMPLE" . font-lock-type-face) - (" = ") - ("'SAMPLE'" . php-string) - (";\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" sample property doc-comment */" . font-lock-doc-face) - ("\n ") - ("private" . php-keyword) - (" ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (";\n\n ") - ("/**\n * " . font-lock-doc-face) - ("@param" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - (" " . font-lock-doc-face) - ("$" php-doc-variable-sigil font-lock-doc-face) - ("name" php-variable-name font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("__construct" . php-function-name) - ("(") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - (")\n {\n ") - ("$" . php-$this-sigil) - ("this" . php-$this) - ("->" . php-object-op) - ("name" . php-property-name) - (" = ") - ("$" . php-variable-sigil) - ("name" . php-variable-name) - ("; ") - ("// " . font-lock-comment-delimiter-face) - ("comment in after code\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("string" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("bool" font-lock-type-face php-string font-lock-doc-face) - ("|" php-string font-lock-doc-face) - ("array" font-lock-type-face php-string font-lock-doc-face) - ("[]|ArrayObject" php-string font-lock-doc-face) - (" */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("foo" . php-variable-name) - (" = hoge();\n\n ") - ("// " . font-lock-comment-delimiter-face) - ("one-line comment\n" . font-lock-comment-face) - (" ") - ("// " . font-lock-comment-delimiter-face) - ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) - ("\n ") - ("/** " . font-lock-doc-face) - ("@var" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("int" font-lock-type-face php-string font-lock-doc-face) - (" internal linter variable */" . font-lock-doc-face) - ("\n ") - ("$" . php-variable-sigil) - ("offset" . php-variable-name) - (" = 0;\n }\n\n ") - ("/**\n * Summary\n *\n * " . font-lock-doc-face) - ("@throws" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("\\RuntimeException" php-string font-lock-doc-face) - ("\n */" . font-lock-doc-face) - ("\n ") - ("public" . php-keyword) - (" ") - ("function" . php-keyword) - (" ") - ("test" . php-function-name) - ("()\n {\n ") - ("throw" . php-keyword) - (" ") - ("new" . php-keyword) - (" ") - ("\\RuntimeException" . font-lock-type-face) - (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/constants.php.faces php-elisp-1.22.2/tests/constants.php.faces --- php-elisp-1.22.1/tests/constants.php.faces 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/constants.php.faces 2019-12-23 16:36:19.000000000 +0000 @@ -4,15 +4,21 @@ ("// " . font-lock-comment-delimiter-face) ("Test c-lang-defconst c-constant-kwds\n" . font-lock-comment-face) ("true" . php-constant) - (" === ") + (" ") + ("===" . php-comparison-op) + (" ") ("TRUE" . php-constant) (";\n") ("false" . php-constant) - (" === ") + (" ") + ("===" . php-comparison-op) + (" ") ("FALSE" . php-constant) (";\n") ("null" . php-constant) - (" === ") + (" ") + ("===" . php-comparison-op) + (" ") ("NULL" . php-constant) (";\n\n") ("// " . font-lock-comment-delimiter-face) diff -Nru php-elisp-1.22.1/tests/doc-comment/inheritdoc.php php-elisp-1.22.2/tests/doc-comment/inheritdoc.php --- php-elisp-1.22.1/tests/doc-comment/inheritdoc.php 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/tests/doc-comment/inheritdoc.php 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -" . php-php-tag) ("\n") ("/** GitHub Issue: " . font-lock-doc-face) @@ -12,11 +13,12 @@ (" */" . font-lock-doc-face) ("\n") ("" . php-php-tag) ("\n") @@ -51,7 +53,9 @@ ("?>" . php-php-tag) ("\n") ("" . php-php-tag) ("\n") ("" . php-php-tag) ("\n") ("/** GitHub Issue: " . font-lock-doc-face) @@ -12,11 +13,12 @@ (" */" . font-lock-doc-face) ("\n") ("" . php-php-tag) ("\n") @@ -51,7 +53,9 @@ ("?>" . php-php-tag) ("\n") ("" . php-php-tag) ("\n") (" + * @link https://github.com/emacs-php/php-mode + * @package Emacs\PHPMode + */ + +// one-line comment +// @annotation This is NOT annotation. 1 + +/*------------------------------------------------ + Multi-line comment + + * @annotation This is NOT annotation. 2 + -------------------------------------------------*/ + +// /** +// * Comment outed class implementation +// * +// * @annotation This is NOT annotation. 3 +// */ +// class CommentOuted +// { +// } + +/** + * Class level doc-comment + * + * Description {@internal Description} inline tag. + * + * @property-read string[] $name + * @ORM\Table(name="majormodes") + * @ORM\Entity(repositoryClass="Emacs\Repository\MajorModeRepository") + */ +final class SampleClass +{ + /** Const doc-comment */ + const SAMPLE = 'SAMPLE'; + /** @var string sample property doc-comment */ + private $name; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; // comment in after code + + /** @var string|bool|array[]|ArrayObject */ + $foo = hoge(); + + // one-line comment + // @annotation This is NOT annotation. 4 + + /** @var int internal linter variable */ + $offset = 0; + } + + /** + * Summary + * + * @throws \RuntimeException + */ + public function test() + { + throw new \RuntimeException; + } +} diff -Nru php-elisp-1.22.1/tests/lang/doc-comment/comments.php.24.faces php-elisp-1.22.2/tests/lang/doc-comment/comments.php.24.faces --- php-elisp-1.22.1/tests/lang/doc-comment/comments.php.24.faces 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/doc-comment/comments.php.24.faces 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,175 @@ +;; -*- mode: emacs-lisp -*- +(("\n * " . font-lock-doc-face) + ("@link" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@package" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("Emacs\\PHPMode" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) + ("\n") + ("/*" . font-lock-comment-delimiter-face) + ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------*/" . font-lock-comment-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("/**\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* Comment outed class implementation\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*/\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("class CommentOuted\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("{\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("}\n" . font-lock-comment-face) + ("\n") + ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) + ("{@internal " php-doc-annotation-tag font-lock-doc-face) + ("Description" php-string php-doc-annotation-tag font-lock-doc-face) + ("}" php-doc-annotation-tag font-lock-doc-face) + (" inline tag.\n *\n * " . font-lock-doc-face) + ("@property-read" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("[]" php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) + ("(name=\"majormodes\")\n * " . font-lock-doc-face) + ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) + ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) + ("\n") + ("final" . php-keyword) + (" ") + ("class" . php-keyword) + (" ") + ("SampleClass" . font-lock-type-face) + ("\n{\n ") + ("/** Const doc-comment */" . font-lock-doc-face) + ("\n ") + ("const" . php-keyword) + (" ") + ("SAMPLE" . php-constant-assign) + (" ") + ("=" . php-assignment-op) + (" ") + ("'SAMPLE'" . php-string) + (";\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" sample property doc-comment */" . font-lock-doc-face) + ("\n ") + ("private" . php-keyword) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (";\n\n ") + ("/**\n * " . font-lock-doc-face) + ("@param" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("__construct" . php-function-name) + ("(") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (")\n {\n ") + ("$" . php-$this-sigil) + ("this" . php-$this) + ("->" . php-object-op) + ("name" . php-property-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + ("; ") + ("// " . font-lock-comment-delimiter-face) + ("comment in after code\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("bool" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("array" font-lock-type-face php-string font-lock-doc-face) + ("[]|ArrayObject" php-string font-lock-doc-face) + (" */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("foo" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("hoge" . php-function-call) + ("();\n\n ") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + (" ") + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("int" font-lock-type-face php-string font-lock-doc-face) + (" internal linter variable */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("offset" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" 0;\n }\n\n ") + ("/**\n * Summary\n *\n * " . font-lock-doc-face) + ("@throws" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("\\RuntimeException" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("test" . php-function-name) + ("()\n {\n ") + ("throw" . php-keyword) + (" ") + ("new" . php-keyword) + (" ") + ("\\RuntimeException" . font-lock-type-face) + (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/lang/doc-comment/comments.php.27.faces php-elisp-1.22.2/tests/lang/doc-comment/comments.php.27.faces --- php-elisp-1.22.1/tests/lang/doc-comment/comments.php.27.faces 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/doc-comment/comments.php.27.faces 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,176 @@ +;; -*- mode: emacs-lisp -*- +(("\n * " . font-lock-doc-face) + ("@link" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@package" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("Emacs\\PHPMode" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) + ("\n") + ("/*" . font-lock-comment-delimiter-face) + ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------" . font-lock-comment-face) + ("*/" . font-lock-comment-delimiter-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("/**\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* Comment outed class implementation\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*/\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("class CommentOuted\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("{\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("}\n" . font-lock-comment-face) + ("\n") + ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) + ("{@internal " php-doc-annotation-tag font-lock-doc-face) + ("Description" php-string php-doc-annotation-tag font-lock-doc-face) + ("}" php-doc-annotation-tag font-lock-doc-face) + (" inline tag.\n *\n * " . font-lock-doc-face) + ("@property-read" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("[]" php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) + ("(name=\"majormodes\")\n * " . font-lock-doc-face) + ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) + ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) + ("\n") + ("final" . php-keyword) + (" ") + ("class" . php-keyword) + (" ") + ("SampleClass" . font-lock-type-face) + ("\n{\n ") + ("/** Const doc-comment */" . font-lock-doc-face) + ("\n ") + ("const" . php-keyword) + (" ") + ("SAMPLE" . font-lock-type-face) + (" ") + ("=" . php-assignment-op) + (" ") + ("'SAMPLE'" . php-string) + (";\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" sample property doc-comment */" . font-lock-doc-face) + ("\n ") + ("private" . php-keyword) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (";\n\n ") + ("/**\n * " . font-lock-doc-face) + ("@param" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("__construct" . php-function-name) + ("(") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (")\n {\n ") + ("$" . php-$this-sigil) + ("this" . php-$this) + ("->" . php-object-op) + ("name" . php-property-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + ("; ") + ("// " . font-lock-comment-delimiter-face) + ("comment in after code\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("bool" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("array" font-lock-type-face php-string font-lock-doc-face) + ("[]|ArrayObject" php-string font-lock-doc-face) + (" */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("foo" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("hoge" . php-function-call) + ("();\n\n ") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + (" ") + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("int" font-lock-type-face php-string font-lock-doc-face) + (" internal linter variable */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("offset" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" 0;\n }\n\n ") + ("/**\n * Summary\n *\n * " . font-lock-doc-face) + ("@throws" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("\\RuntimeException" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("test" . php-function-name) + ("()\n {\n ") + ("throw" . php-keyword) + (" ") + ("new" . php-keyword) + (" ") + ("\\RuntimeException" . font-lock-type-face) + (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/lang/doc-comment/comments.php.faces php-elisp-1.22.2/tests/lang/doc-comment/comments.php.faces --- php-elisp-1.22.1/tests/lang/doc-comment/comments.php.faces 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/doc-comment/comments.php.faces 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,175 @@ +;; -*- mode: emacs-lisp -*- +(("\n * " . font-lock-doc-face) + ("@link" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@package" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("Emacs\\PHPMode" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 1\n" . font-lock-comment-face) + ("\n") + ("/*" . font-lock-comment-delimiter-face) + ("------------------------------------------------\n Multi-line comment\n\n * @annotation This is NOT annotation. 2\n -------------------------------------------------*/" . font-lock-comment-face) + ("\n\n") + ("// " . font-lock-comment-delimiter-face) + ("/**\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* Comment outed class implementation\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("* @annotation This is NOT annotation. 3\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("*/\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("class CommentOuted\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("{\n" . font-lock-comment-face) + ("// " . font-lock-comment-delimiter-face) + ("}\n" . font-lock-comment-face) + ("\n") + ("/**\n * Class level doc-comment\n *\n * Description " . font-lock-doc-face) + ("{@internal " php-doc-annotation-tag font-lock-doc-face) + ("Description" php-string php-doc-annotation-tag font-lock-doc-face) + ("}" php-doc-annotation-tag font-lock-doc-face) + (" inline tag.\n *\n * " . font-lock-doc-face) + ("@property-read" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("[]" php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n * " . font-lock-doc-face) + ("@ORM\\Table" php-doc-annotation-tag font-lock-doc-face) + ("(name=\"majormodes\")\n * " . font-lock-doc-face) + ("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face) + ("(repositoryClass=\"Emacs\\Repository\\MajorModeRepository\")\n */" . font-lock-doc-face) + ("\n") + ("final" . php-keyword) + (" ") + ("class" . php-keyword) + (" ") + ("SampleClass" . font-lock-type-face) + ("\n{\n ") + ("/** Const doc-comment */" . font-lock-doc-face) + ("\n ") + ("const" . php-keyword) + (" ") + ("SAMPLE" . font-lock-type-face) + (" ") + ("=" . php-assignment-op) + (" ") + ("'SAMPLE'" . php-string) + (";\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" sample property doc-comment */" . font-lock-doc-face) + ("\n ") + ("private" . php-keyword) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (";\n\n ") + ("/**\n * " . font-lock-doc-face) + ("@param" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + (" " . font-lock-doc-face) + ("$" php-doc-variable-sigil font-lock-doc-face) + ("name" php-variable-name font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("__construct" . php-function-name) + ("(") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + (")\n {\n ") + ("$" . php-$this-sigil) + ("this" . php-$this) + ("->" . php-object-op) + ("name" . php-property-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("$" . php-variable-sigil) + ("name" . php-variable-name) + ("; ") + ("// " . font-lock-comment-delimiter-face) + ("comment in after code\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("string" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("bool" font-lock-type-face php-string font-lock-doc-face) + ("|" php-string font-lock-doc-face) + ("array" font-lock-type-face php-string font-lock-doc-face) + ("[]|ArrayObject" php-string font-lock-doc-face) + (" */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("foo" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("hoge" . php-function-call) + ("();\n\n ") + ("// " . font-lock-comment-delimiter-face) + ("one-line comment\n" . font-lock-comment-face) + (" ") + ("// " . font-lock-comment-delimiter-face) + ("@annotation This is NOT annotation. 4\n" . font-lock-comment-face) + ("\n ") + ("/** " . font-lock-doc-face) + ("@var" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("int" font-lock-type-face php-string font-lock-doc-face) + (" internal linter variable */" . font-lock-doc-face) + ("\n ") + ("$" . php-variable-sigil) + ("offset" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" 0;\n }\n\n ") + ("/**\n * Summary\n *\n * " . font-lock-doc-face) + ("@throws" php-doc-annotation-tag font-lock-doc-face) + (" " . font-lock-doc-face) + ("\\RuntimeException" php-string font-lock-doc-face) + ("\n */" . font-lock-doc-face) + ("\n ") + ("public" . php-keyword) + (" ") + ("function" . php-keyword) + (" ") + ("test" . php-function-name) + ("()\n {\n ") + ("throw" . php-keyword) + (" ") + ("new" . php-keyword) + (" ") + ("\\RuntimeException" . font-lock-type-face) + (";\n }\n}\n")) diff -Nru php-elisp-1.22.1/tests/lang/doc-comment/inheritdoc.php php-elisp-1.22.2/tests/lang/doc-comment/inheritdoc.php --- php-elisp-1.22.1/tests/lang/doc-comment/inheritdoc.php 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/doc-comment/inheritdoc.php 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,5 @@ +string(); +$foo->isset(); + + +$a->b(); +$a = a(); +$aaa = aaa(); +$_aa = _aa(); +$a_a = a_a(); +$aa_ = aa_(); +$a1c = a1c(); +$あ = あ(); +$_a = $a(); diff -Nru php-elisp-1.22.1/tests/lang/function/calls.php.faces php-elisp-1.22.2/tests/lang/function/calls.php.faces --- php-elisp-1.22.1/tests/lang/function/calls.php.faces 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/function/calls.php.faces 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,87 @@ +;; -*- mode: emacs-lisp -*- +(("" . php-object-op) + ("string" . php-method-call) + ("();\n") + ("$" . php-variable-sigil) + ("foo" . php-variable-name) + ("->" . php-object-op) + ("isset" . php-method-call) + ("();\n\n\n") + ("$" . php-variable-sigil) + ("a" . php-variable-name) + ("->" . php-object-op) + ("b" . php-method-call) + ("();\n") + ("$" . php-variable-sigil) + ("a" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("a" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("aaa" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("aaa" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("_aa" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("_aa" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("a_a" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("a_a" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("aa_" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("aa_" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("a1c" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("a1c" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("あ" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("あ" . php-function-call) + ("();\n") + ("$" . php-variable-sigil) + ("_a" . php-variable-name) + (" ") + ("=" . php-assignment-op) + (" ") + ("$" . php-variable-sigil) + ("a" . php-variable-name) + ("();\n")) diff -Nru php-elisp-1.22.1/tests/lang/function/closure.php php-elisp-1.22.2/tests/lang/function/closure.php --- php-elisp-1.22.1/tests/lang/function/closure.php 1970-01-01 00:00:00.000000000 +0000 +++ php-elisp-1.22.2/tests/lang/function/closure.php 2019-12-23 16:36:19.000000000 +0000 @@ -0,0 +1,9 @@ +We\" is a single quote. It should not @@ -540,7 +536,8 @@ (ert-deftest php-mode-test-issue-227 () "multi-line strings indents " (custom-set-variables '(php-lineup-cascaded-calls t)) - (with-php-mode-test ("issue-227.php" :indent t :style pear))) + (with-php-mode-test ("issue-227.php" :indent t :style pear :magic t))) + (ert-deftest php-mode-test-issue-237 () "Indent chaining method for PSR2." (with-php-mode-test ("issue-237.php" :indent t :style psr2 :magic t))) @@ -559,10 +556,6 @@ (should (eq 'php-variable-sigil (get-text-property (match-beginning 0) 'face))) (should (eq 'php-variable-name (get-text-property (1+ (match-beginning 0)) 'face))))) -(ert-deftest psr-5-style-tag-annotation () - "PSR-5 style tag annotation." - (with-php-mode-test ("annotation.php" :faces t))) - (ert-deftest php-mode-test-issue-305 () "Test highlighting variables which contains 'this' or 'that'." (with-php-mode-test ("issue-305.php" :faces t))) @@ -674,12 +667,17 @@ (ert-deftest php-mode-test-lang () "Test highlighting for language constructs." - (with-php-mode-test ("comments.php" + (with-php-mode-test ("lang/class/anonymous-class.php" :indent t :magic t :faces t)) + (with-php-mode-test ("lang/doc-comment/comments.php" :faces (cond ((eq emacs-major-version 24) ".24.faces") ((version<= "27" emacs-version) ".27.faces") (t t)))) - (with-php-mode-test ("doc-comment/return-type.php" :faces t)) - (with-php-mode-test ("doc-comment/inheritdoc.php" :faces t)) + (with-php-mode-test ("lang/doc-comment/annotation.php" :faces t)) + (with-php-mode-test ("lang/doc-comment/issue-8.php" :faces t)) + (with-php-mode-test ("lang/doc-comment/inheritdoc.php" :faces t)) + (with-php-mode-test ("lang/doc-comment/return-type.php" :faces t)) + (with-php-mode-test ("lang/function/calls.php" :faces t)) + (with-php-mode-test ("lang/function/closure.php" :indent t :magic t :faces t)) (with-php-mode-test ("lang/try-cactch/multiple.php" :faces t)) (with-php-mode-test ("lang/types/cast.php" :faces t)) (with-php-mode-test ("lang/types/function.php" :faces t)) diff -Nru php-elisp-1.22.1/.travis.yml php-elisp-1.22.2/.travis.yml --- php-elisp-1.22.1/.travis.yml 2019-11-10 12:48:42.000000000 +0000 +++ php-elisp-1.22.2/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -language: emacs-lisp -env: - matrix: - - EMACS_VERSION=emacs-24.4-travis - - EMACS_VERSION=emacs-24.5-travis - - EMACS_VERSION=emacs-25.2-travis - - EMACS_VERSION=emacs-25.3-travis - - EMACS_VERSION=emacs-26.1-travis - - EMACS_VERSION=emacs-26.2-travis - - EMACS_VERSION=emacs-26.3-travis - - EMACS_VERSION=emacs-git-snapshot-travis - - EMACS_VERSION=remacs-git-snapshot-travis -matrix: - fast_finish: true - allow_failures: - - env: EMACS_VERSION=emacs-git-snapshot-travis - -before_install: - - export PATH="/home/travis/.evm/bin:$PATH" - - git clone https://github.com/rejeep/evm.git /home/travis/.evm - - evm config path /tmp - - evm install $EMACS_VERSION --use || true - -script: - # Make sure the exact emacs version can be found in the build output. - - emacs -Q --batch --eval '(message (emacs-version))' - - make test