Skip to content

Commit 1e16e20

Browse files
authored
Merge pull request #511 from emacs-php/release/v1.21.2
Release v1.21.2
2 parents c2eeb05 + 2759f89 commit 1e16e20

File tree

6 files changed

+79
-16
lines changed

6 files changed

+79
-16
lines changed

Cask

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(package "php-mode" "1.21.1" "Major mode for editing PHP code")
1+
(package "php-mode" "1.21.2" "Major mode for editing PHP code")
22
(source melpa)
33

44
(package-file "php-mode.el")

Changelog.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,24 @@
22

33
All notable changes of the PHP Mode 1.19.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5-
## [1.21.2]
5+
## [1.21.2] - 2019-05-11
6+
7+
It officially supports **PHP 7.3** and **Emacs 26.2**.
8+
Many improvements have been received from [@sergeyklay], thank you!
9+
10+
### Added
11+
12+
* Highlighting added `fn` keyword supported by [PHP 7.2 arrow function] ([#506])
613

714
### Fixed
815

9-
* Function `php-beginning-of-defun` should return non-nil on success
10-
([#503](https://github.com/emacs-php/php-mode/issues/503))
16+
* Function `php-beginning-of-defun` should return non-nil on success ([#503])
17+
* Fixed an error that occurred in some heredoc/nowdoc ([#496])
18+
19+
### Changed
20+
21+
* Support PHP 7.3 heredoc/nowdoc ([#496])
22+
* Minor optimization of font-lock regular expression ([#510])
1123

1224
## [1.21.1] - 2019-04-01
1325

@@ -102,5 +114,11 @@ Start preparing for major refactoring in major mode.
102114

103115
See [Changelog · emacs-php/php-mode Wiki](https://github.com/emacs-php/php-mode/wiki/Changelog).
104116

117+
[#496]: https://github.com/emacs-php/php-mode/pull/496
118+
[#503]: https://github.com/emacs-php/php-mode/issues/503
119+
[#506]: https://github.com/emacs-php/php-mode/issues/506
120+
[#510]: https://github.com/emacs-php/php-mode/pull/510
105121
[@ejmr]: https://github.com/ejmr
106122
[@fabacino]: https://github.com/fabacino
123+
[@sergeyklay]: https://github.com/sergeyklay
124+
[PHP 7.2 arrow function]: https://wiki.php.net/rfc/arrow_functions_v2

php-mode.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
;; Maintainer: USAMI Kenta <[email protected]>
1010
;; URL: https://github.com/emacs-php/php-mode
1111
;; Keywords: languages php
12-
;; Version: 1.21.1
12+
;; Version: 1.21.2
1313
;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
1414
;; License: GPL-3.0-or-later
1515

16-
(defconst php-mode-version-number "1.21.1"
16+
(defconst php-mode-version-number "1.21.2"
1717
"PHP Mode version number.")
1818

19-
(defconst php-mode-modified "2019-04-01"
19+
(defconst php-mode-modified "2019-05-11"
2020
"PHP Mode build date.")
2121

2222
;; This program is free software; you can redistribute it and/or modify
@@ -98,7 +98,7 @@
9898
;; Work around emacs bug#18845, cc-mode expects cl to be loaded
9999
;; while php-mode only uses cl-lib (without compatibility aliases)
100100
(eval-and-compile
101-
(if (and (= emacs-major-version 24) (>= emacs-minor-version 4))
101+
(when (and (= emacs-major-version 24) (>= emacs-minor-version 4))
102102
(require 'cl)))
103103

104104
;; Work around https://github.com/emacs-php/php-mode/issues/310.
@@ -191,7 +191,7 @@ Turning this on will open it whenever `php-mode' is loaded."
191191
"Create regexp for the list of extra constant keywords KWDS."
192192
(concat "[^_$]?\\<\\("
193193
(regexp-opt
194-
(append kwds
194+
(append kwds
195195
(when (boundp 'web-mode-extra-php-constants) web-mode-extra-php-constants)))
196196
"\\)\\>[^_]?"))
197197

php-project.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Author: USAMI Kenta <[email protected]>
66
;; Keywords: tools, files
77
;; URL: https://github.com/emacs-php/php-mode
8-
;; Version: 1.21.1
8+
;; Version: 1.21.2
99
;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
1010
;; License: GPL-3.0-or-later
1111

tests/variables.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
<?php
22

33
// Test highlighting of variables with the variable-name-face
4+
$_;
45
$regularVariable;
56
$$variableVariable;
7+
$漢字;
8+
$snake_case;
9+
$abc123xyz;
10+
$def_456_ghi;
11+
${'var'};
12+
${"var"};
13+
${$var};
14+
${'v' . 'ar'};
15+
$a{1};
16+
$a{'a'};
617
MyClass::$staticVariable;
718
$object->memberVariable;
819
$object->funCall();

tests/variables.php.faces

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,60 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
3-
("\n\n" . nil)
3+
("\n\n")
44
("// " . font-lock-comment-delimiter-face)
55
("Test highlighting of variables with the variable-name-face\n" . font-lock-comment-face)
66
("$" . php-variable-sigil)
7+
("_" . php-variable-name)
8+
(";\n")
9+
("$" . php-variable-sigil)
710
("regularVariable" . php-variable-name)
8-
(";\n" . nil)
11+
(";\n")
912
("$$" . php-variable-sigil)
1013
("variableVariable" . php-variable-name)
11-
(";\n" . nil)
14+
(";\n")
15+
("$" . php-variable-sigil)
16+
("漢字" . php-variable-name)
17+
(";\n")
18+
("$" . php-variable-sigil)
19+
("snake_case" . php-variable-name)
20+
(";\n")
21+
("$" . php-variable-sigil)
22+
("abc123xyz" . php-variable-name)
23+
(";\n")
24+
("$" . php-variable-sigil)
25+
("def_456_ghi" . php-variable-name)
26+
(";\n${")
27+
("'var'" . php-string)
28+
("};\n${")
29+
("\"var\"" . php-string)
30+
("};\n${")
31+
("$" . php-variable-sigil)
32+
("var" . php-variable-name)
33+
("};\n${")
34+
("'v'" . php-string)
35+
(" . ")
36+
("'ar'" . php-string)
37+
("};\n")
38+
("$" . php-variable-sigil)
39+
("a" . php-variable-name)
40+
("{1};\n")
41+
("$" . php-variable-sigil)
42+
("a" . php-variable-name)
43+
("{")
44+
("'a'" . php-string)
45+
("};\n")
1246
("MyClass" . php-constant)
1347
("::" . php-paamayim-nekudotayim)
1448
("$" . php-variable-sigil)
1549
("staticVariable" . php-variable-name)
16-
(";\n" . nil)
50+
(";\n")
1751
("$" . php-variable-sigil)
1852
("object" . php-variable-name)
1953
("->" . php-object-op)
2054
("memberVariable" . php-property-name)
21-
(";\n" . nil)
55+
(";\n")
2256
("$" . php-variable-sigil)
2357
("object" . php-variable-name)
2458
("->" . php-object-op)
2559
("funCall" . php-method-call)
26-
("();\n" . nil))
60+
("();\n"))

0 commit comments

Comments
 (0)