Skip to content

Commit

Permalink
Merge pull request #511 from emacs-php/release/v1.21.2
Browse files Browse the repository at this point in the history
Release v1.21.2
  • Loading branch information
zonuexe authored May 11, 2019
2 parents c2eeb05 + 2759f89 commit 1e16e20
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cask
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(package "php-mode" "1.21.1" "Major mode for editing PHP code")
(package "php-mode" "1.21.2" "Major mode for editing PHP code")
(source melpa)

(package-file "php-mode.el")
Expand Down
24 changes: 21 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@

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.

## [1.21.2]
## [1.21.2] - 2019-05-11

It officially supports **PHP 7.3** and **Emacs 26.2**.
Many improvements have been received from [@sergeyklay], thank you!

### Added

* Highlighting added `fn` keyword supported by [PHP 7.2 arrow function] ([#506])

### Fixed

* Function `php-beginning-of-defun` should return non-nil on success
([#503](https://github.com/emacs-php/php-mode/issues/503))
* Function `php-beginning-of-defun` should return non-nil on success ([#503])
* Fixed an error that occurred in some heredoc/nowdoc ([#496])

### Changed

* Support PHP 7.3 heredoc/nowdoc ([#496])
* Minor optimization of font-lock regular expression ([#510])

## [1.21.1] - 2019-04-01

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

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

[#496]: https://github.com/emacs-php/php-mode/pull/496
[#503]: https://github.com/emacs-php/php-mode/issues/503
[#506]: https://github.com/emacs-php/php-mode/issues/506
[#510]: https://github.com/emacs-php/php-mode/pull/510
[@ejmr]: https://github.com/ejmr
[@fabacino]: https://github.com/fabacino
[@sergeyklay]: https://github.com/sergeyklay
[PHP 7.2 arrow function]: https://wiki.php.net/rfc/arrow_functions_v2
10 changes: 5 additions & 5 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
;; Maintainer: USAMI Kenta <[email protected]>
;; URL: https://github.com/emacs-php/php-mode
;; Keywords: languages php
;; Version: 1.21.1
;; Version: 1.21.2
;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
;; License: GPL-3.0-or-later

(defconst php-mode-version-number "1.21.1"
(defconst php-mode-version-number "1.21.2"
"PHP Mode version number.")

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion php-project.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: USAMI Kenta <[email protected]>
;; Keywords: tools, files
;; URL: https://github.com/emacs-php/php-mode
;; Version: 1.21.1
;; Version: 1.21.2
;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
;; License: GPL-3.0-or-later

Expand Down
11 changes: 11 additions & 0 deletions tests/variables.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<?php

// Test highlighting of variables with the variable-name-face
$_;
$regularVariable;
$$variableVariable;
$漢字;
$snake_case;
$abc123xyz;
$def_456_ghi;
${'var'};
${"var"};
${$var};
${'v' . 'ar'};
$a{1};
$a{'a'};
MyClass::$staticVariable;
$object->memberVariable;
$object->funCall();
46 changes: 40 additions & 6 deletions tests/variables.php.faces
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n" . nil)
("\n\n")
("// " . font-lock-comment-delimiter-face)
("Test highlighting of variables with the variable-name-face\n" . font-lock-comment-face)
("$" . php-variable-sigil)
("_" . php-variable-name)
(";\n")
("$" . php-variable-sigil)
("regularVariable" . php-variable-name)
(";\n" . nil)
(";\n")
("$$" . php-variable-sigil)
("variableVariable" . php-variable-name)
(";\n" . nil)
(";\n")
("$" . php-variable-sigil)
("漢字" . php-variable-name)
(";\n")
("$" . php-variable-sigil)
("snake_case" . php-variable-name)
(";\n")
("$" . php-variable-sigil)
("abc123xyz" . php-variable-name)
(";\n")
("$" . php-variable-sigil)
("def_456_ghi" . php-variable-name)
(";\n${")
("'var'" . php-string)
("};\n${")
("\"var\"" . php-string)
("};\n${")
("$" . php-variable-sigil)
("var" . php-variable-name)
("};\n${")
("'v'" . php-string)
(" . ")
("'ar'" . php-string)
("};\n")
("$" . php-variable-sigil)
("a" . php-variable-name)
("{1};\n")
("$" . php-variable-sigil)
("a" . php-variable-name)
("{")
("'a'" . php-string)
("};\n")
("MyClass" . php-constant)
("::" . php-paamayim-nekudotayim)
("$" . php-variable-sigil)
("staticVariable" . php-variable-name)
(";\n" . nil)
(";\n")
("$" . php-variable-sigil)
("object" . php-variable-name)
("->" . php-object-op)
("memberVariable" . php-property-name)
(";\n" . nil)
(";\n")
("$" . php-variable-sigil)
("object" . php-variable-name)
("->" . php-object-op)
("funCall" . php-method-call)
("();\n" . nil))
("();\n"))

0 comments on commit 1e16e20

Please sign in to comment.