Skip to content

Commit e31073a

Browse files
committed
Bump up version 1.28.0
1 parent 3d57e94 commit e31073a

16 files changed

Lines changed: 68 additions & 87 deletions

.github/workflows/test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
emacs-version:
23-
- "27.2"
2423
- "28.2"
2524
- "29.4"
2625
- "30.2"
26+
# - "31.1"
2727
experimental: [false]
2828
include:
2929
- os: ubuntu-latest
@@ -35,9 +35,6 @@ jobs:
3535
- os: windows-latest
3636
emacs-version: snapshot
3737
experimental: true
38-
exclude:
39-
- os: macos-latest
40-
emacs-version: "27.2"
4138
steps:
4239
- uses: actions/setup-python@v7
4340
with:

CHANGELOG.md

Lines changed: 45 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,71 @@
11
# Changes for PHP Mode by Version
22

3-
All notable changes of the PHP Mode 1.19.1 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
3+
This file documents notable changes to PHP Mode according to the [Keep a Changelog](https://keepachangelog.com/) principles.
44

5-
## Unreleased
5+
<!-- ## Unreleased -->
6+
7+
## [1.28.0] - 2026-08-25
68

79
### Added
810

9-
* `php-project-get-root-dir` falls back to `project-current` when no PHP-specific marker is found, so `project.el` backends (Projectile 3, `project-vc-extra-root-markers`, etc.) can contribute project detection
10-
* Add `php-ide-set-feature` command to interactively enable a PHP-IDE feature for the current buffer
11-
* Only offers features whose backing package is actually available
12-
* Add `php-ide-status` command to report the current PHP-IDE state for the current buffer
13-
* Shows whether it is on, what is configured, and what is available
14-
* Add `php-ide-eglot-activate`, which registers `php-ide-eglot-executable` into `eglot-server-programs`
15-
* Buffer-local, so only buffers that set the variable are affected; previously the variable had no effect on Eglot at all
16-
* Add a `phpantom` preset to `php-ide-lsp-command-alist` for the [PHPantom](https://github.com/PHPantom-dev/phpantom_lsp) PHP language server
17-
* Set `php-ide-eglot-executable` to `'phpantom` (safe for `.dir-locals.el`) to run `phpantom_lsp` under Eglot
18-
* Add a `php-lsp` preset to `php-ide-lsp-command-alist` for the [php-lsp](https://github.com/jorgsowa/php-lsp) PHP language server
19-
* Set `php-ide-eglot-executable` to `'php-lsp` (safe for `.dir-locals.el`) to run `php-lsp` under Eglot
20-
* Add `php-cc-mode` as a forward-compatible alias for the CC Mode based `php-mode`
21-
* Lets configuration and third-party code refer to the CC Mode implementation by the name it will keep once `php-mode` becomes cc-mode independent; loading it has no effect on `php-mode` itself
22-
* `php-cc-mode-hook`, `php-cc-mode-lineup-cascaded-calls` and `php-cc-mode-enable-backup-style-variables` are provided as aliases of their current `php-mode-*` counterparts
11+
* Add `php-phpdbg-disassemble-file` and `php-parse-file` commands ([#804])
12+
* Select an HTML template major mode for PHP files that contain HTML and add per-project control through `php-project-php-file-as-template` ([#742])
13+
* Include `php-align.el` and `php-flymake.el` in the package ([#820])
14+
* Add a `php-pipe-op` face for PHP 8.5's pipe operator ([#821])
15+
* Add `php-ide-set-feature`, `php-ide-status`, and `php-ide-eglot-activate` commands ([#826])
16+
* Add `phpantom` and `php-lsp` presets to `php-ide-lsp-command-alist` ([#830])
17+
* Add `php-cc-mode` as a forward-compatible alias for the CC Mode based `php-mode` ([#828])
2318

2419
### Changed
2520

2621
* Add `readonly` class modifier to [Imenu] ([#802])
2722
* Add `enum` support to `php-current-class` ([#802])
2823
* Remove hardcoding of implicit paths in `php` that are not guaranteed to exist ([#803])
29-
* `php-ide-turn-on` no longer errors when `php-ide-features` is unset
30-
* It is now a silent no-op, matching the README's `hack-local-variables-hook` recipe, which previously errored on every PHP file until a feature was configured
31-
* `php-ide-features` now also accepts a bare feature symbol, not just a list
32-
* This was already shown (but not actually supported) in `php-ide.el`'s own Commentary
33-
* Restrict `:safe` on `php-ide-features`/`php-ide-eglot-executable`, and drop `:safe` from `php-ide-mode-functions` entirely
34-
* Previously these let a `.dir-locals.el` silently run an attacker-chosen command or Lisp function without Emacs's usual confirmation; now only PHP-IDE's own known feature symbols and bundled executable presets are accepted
35-
* **If you now get prompted** by a `.dir-locals.el` you wrote and trust yourself (e.g. `php-ide-eglot-executable` set to a raw path/command, or any use of `php-ide-mode-functions`), this is expected — PHP-IDE can no longer vouch for that value as safe. Answer `!` at the prompt to permanently remember that exact value (all supported Emacs versions), or `+` to trust the whole directory from then on (Emacs 30.1+); see `(info "(emacs) Directory Variables")`. You can also pre-approve values ahead of time in your own init file via `safe-local-variable-values` / `safe-local-variable-directories`, so you are never prompted even on first visit.
36-
* `php-ide-mode-functions` was always meant to be configured globally with `add-hook` in your init file (see the Commentary in `php-ide.el`), not set per-project via `.dir-locals.el`. For per-project behavior, branch on the `FEATURE` argument inside your hook function instead of varying the variable's value by directory.
37-
* Mark `php-ide-feature-alist` and `php-ide-lsp-command-alist` as risky local variables
38-
* They decide which command PHP-IDE executes and which functions it calls, and adding an entry to `php-ide-lsp-command-alist` also makes that entry pass the `:safe` check of `php-ide-eglot-executable` — so a project could otherwise have supplied both the command and its own approval. Risky variables are always confirmed and never remembered as safe
39-
* `php-ide-mode` now warns when `php-ide-features` enables more than one LSP client at once
40-
* Activation still proceeds; Phpactor's bridge is not an LSP client and pairs with one without a warning
41-
* Make `php-ide-lsp-command-alist` and `php-ide-eglot-managed-modes` customizable
42-
* Adding your own preset to `php-ide-lsp-command-alist` is also how you let a project select that server from `.dir-locals.el` without confirming an executable path
43-
* Narrow the "experimental" note in `php-ide.el` to what it actually covers
44-
* The options and commands documented in the README are settled; what may still change is how a feature is described to PHP-IDE (the `php-ide-feature-alist` entry keywords and `php-ide--...` internals)
24+
* Make `php-mode-maybe` honor `major-mode-remap-alist` ([#816])
25+
* Let `php-project-get-root-dir` use `project.el` backends after PHP-specific markers ([#823])
26+
* Make `php-ide-features` accept a bare feature symbol and make `php-ide-turn-on` a no-op when no features are configured ([#826])
27+
* Restrict safe directory-local PHP-IDE values and mark command and function alists as risky ([#826])
28+
* Warn about multiple active LSP clients and make PHP-IDE server and mode alists customizable ([#827])
4529

4630
### Fixed
4731

48-
* `php-project-project-find-function` now returns a `project.el` value valid on Emacs 28+; it previously built a `(vc . ROOT)` cons that broke the 3-element `(vc BACKEND ROOT)` representation and made `project-root` signal an error
49-
* Fix the `:safe` predicate of `php-complete-function-modules`, which accepted any list and never actually applied
50-
* It looped over the standard Emacs variable `values` instead of its own argument, so `cl-loop ... always` succeeded vacuously and unknown module names passed as safe
51-
* Emacs also checks directory-local values *before* php-complete.el is loaded, so the predicate ran as copied into the autoloads file and hit `void-function cl-loop`. `safe-local-variable-p` demotes such errors to nil, so every project setting this variable was prompted for confirmation regardless
52-
* That half of the fix applies on Emacs 28 and later; Emacs 27 does not copy `:safe` predicates into the autoloads file at all, so it keeps prompting until php-complete.el is loaded
53-
* Fix function name completion sorting the user's `php-complete-function-modules` in place
54-
* The first completion reordered the value the user had set, e.g. `(pcntl bcmath core)` became `(bcmath core pcntl)`
55-
* Fix function name completion offering module names as if they were PHP functions
56-
* Entries of `php-defs-functions-alist` are `(MODULE . FUNCTION-NAMES)` and the whole entry was appended, so every enabled module leaked its own name into the candidates
57-
* Fix the `phpactor` PHP-IDE feature's `:deactivate` to actually deactivate
58-
* It pointed at `php-ide-phpactor-activate` instead of `php-ide-phpactor-deactivate`, so turning `php-ide-mode` off re-activated Phpactor instead
59-
* Fix `php-ide-eglot-server-program` to return a valid command list for symbolic `php-ide-eglot-executable` values
60-
* e.g. `intelephense`, `phpactor` — the `assq` result was used without `cdr`
61-
* Fix the `lsp-mode` PHP-IDE feature's `:deactivate` to no longer error when turning `php-ide-mode` off
62-
* It called `lsp-workspace-shutdown`, which requires a `WORKSPACE` argument and signalled `wrong-number-of-arguments`; switched to the buffer-scoped `lsp-disconnect`
63-
* Fix the `:safe` predicates of `php-ide-features`/`php-ide-eglot-executable`, which never actually applied
64-
* Emacs checks directory-local values *before* `php-ide.el` is loaded, so the predicates ran as copied into the autoloads file, where they hit `void-function cl-loop` / `void-variable php-ide-lsp-command-alist`. `safe-local-variable-p` demotes such errors to nil, so every project setting these variables was prompted for confirmation regardless
65-
* Fix Phpactor hover suppression to match its documented "any predicate matches" behavior
66-
* `php-ide-phpactor-disable-hover-at-point-functions` was combined with AND, so an empty list disabled hover everywhere and multiple predicates only fired when all matched
67-
* Fix `php-ide-mode` deactivation stopping Phpactor hover in unrelated buffers
68-
* The hover timer is shared by all buffers but was cancelled unconditionally; it is now retired only once no live buffer uses hover
69-
* Fix `php-ide-mode` staying on after a feature failed to activate
70-
* The mode line claimed PHP-IDE was running while nothing had started, and turning it back off then signalled `void-function`. Activation now rolls back and leaves the mode off
71-
* Fix `php-ide-mode` deactivating the wrong feature after `php-ide-features` changes
72-
* Deactivation re-read the variable, so editing `.dir-locals.el` and re-applying it to a live buffer stranded the feature that was really running; it now tracks what it activated
73-
* Fix `php-ide-mode` activating features twice when it is re-enabled
74-
* `hack-local-variables-hook`, where the documented recipe puts `php-ide-turn-on`, runs again on `revert-buffer` and friends
75-
* Fix the `phpactor` PHP-IDE feature failing to activate outside a package installation
76-
* `php-ide.el` requires `php-ide-phpactor` only at compile time, so its `:activate`/`:deactivate` resolved only via the package autoloads; the feature now loads it from `:test`
32+
* Fix array alignment when an empty line is present ([#801])
33+
* Fix compatibility with upcoming Emacs 32 ([#809])
34+
* Fix PHP function completion sorting, module filtering, and directory-local validation ([#825])
35+
* Fix PHP-IDE feature activation, deactivation, repeated enabling, and Phpactor hover cleanup ([#826], [#827])
36+
* Return a valid `project.el` representation from `php-project-project-find-function` ([#823])
37+
* Fall back to an HTML mode for Blade templates when `web-mode` is unavailable ([#817])
38+
* Use one PHP executable source for project and Flymake integrations ([#818])
39+
* Fix compilation of `php-flymake` with current Emacs versions ([#829])
7740

7841
### Deprecated
7942

8043
* `php-project-use-projectile-to-detect-root` is obsolete; Projectile 3 registers itself on `project-find-functions`, which `php-project-get-root-dir` now consults automatically
8144

45+
### Removed
46+
47+
* Drop support for Emacs 27.x ([#811])
48+
8249
[Imenu]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html
50+
[#742]: https://github.com/emacs-php/php-mode/pull/742
51+
[#801]: https://github.com/emacs-php/php-mode/pull/801
8352
[#802]: https://github.com/emacs-php/php-mode/pull/802
8453
[#803]: https://github.com/emacs-php/php-mode/pull/803
54+
[#804]: https://github.com/emacs-php/php-mode/pull/804
55+
[#809]: https://github.com/emacs-php/php-mode/pull/809
56+
[#811]: https://github.com/emacs-php/php-mode/issues/811
57+
[#816]: https://github.com/emacs-php/php-mode/pull/816
58+
[#817]: https://github.com/emacs-php/php-mode/pull/817
59+
[#818]: https://github.com/emacs-php/php-mode/pull/818
60+
[#820]: https://github.com/emacs-php/php-mode/pull/820
61+
[#821]: https://github.com/emacs-php/php-mode/pull/821
62+
[#823]: https://github.com/emacs-php/php-mode/pull/823
63+
[#825]: https://github.com/emacs-php/php-mode/pull/825
64+
[#826]: https://github.com/emacs-php/php-mode/pull/826
65+
[#827]: https://github.com/emacs-php/php-mode/pull/827
66+
[#828]: https://github.com/emacs-php/php-mode/pull/828
67+
[#829]: https://github.com/emacs-php/php-mode/pull/829
68+
[#830]: https://github.com/emacs-php/php-mode/pull/830
8569

8670
## [1.27.0] - 2024-12-20
8771

Eask

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
;; -*- mode: eask; lexical-binding: t -*-
22

33
(package "php-mode"
4-
"1.26.1"
4+
"1.28.0"
55
"Major mode for editing PHP code")
66

77
(website-url "https://github.com/emacs-php/php-mode")
@@ -32,7 +32,7 @@
3232
(source 'melpa)
3333
(source 'gnu)
3434

35-
(depends-on "emacs" "27.1")
35+
(depends-on "emacs" "28.1")
3636

3737
(development
3838
(depends-on "phpactor")

README.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align="center">
22
<h1>Emacs PHP Mode</h1>
33

4-
[![Emacs: 30.0](https://img.shields.io/badge/Emacs-30.0-blue.svg)](https://www.gnu.org/software/emacs/)
5-
[![lang: PHP 8.4](https://img.shields.io/badge/lang-PHP%208.4-brightgreen.svg)](https://www.php.net/releases/8.4/)
4+
[![Emacs: 31.1](https://img.shields.io/badge/Emacs-31.1-blue.svg)](https://www.gnu.org/software/emacs/)
5+
[![lang: PHP 8.5](https://img.shields.io/badge/lang-PHP%208.5-brightgreen.svg)](https://www.php.net/releases/8.5/)
66
[![Build Status](https://github.com/emacs-php/php-mode/workflows/CI/badge.svg)](https://github.com/emacs-php/php-mode/actions)
77
[![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)][gpl-v3]<br>
88
[![NonGNU ELPA][nongnu-elpa-badge]][nongnu-elpa]
@@ -29,7 +29,7 @@ A powerful and flexible Emacs major mode for editing PHP scripts
2929

3030
## インストール
3131

32-
**PHP ModeはEmacs 27.1以降で動作します**。対応バージョンの詳細は[Supported Version]をお読みください。Emacs 28以降では単に以下のコマンドを実行するだけでインストールできます
32+
**PHP ModeはEmacs 28.1以降で動作します**。対応バージョンの詳細は[Supported Version]をお読みください。Emacs 28.1以降では単に以下のコマンドを実行するだけでインストールできます
3333

3434
```
3535
M-x package-install php-mode

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align="center">
22
<h1>Emacs PHP Mode</h1>
33

4-
[![Emacs: 30.0](https://img.shields.io/badge/Emacs-30.0-blue.svg)](https://www.gnu.org/software/emacs/)
5-
[![lang: PHP 8.4](https://img.shields.io/badge/lang-PHP%208.4-brightgreen.svg)](https://www.php.net/releases/8.4/)
4+
[![Emacs: 31.1](https://img.shields.io/badge/Emacs-31.1-blue.svg)](https://www.gnu.org/software/emacs/)
5+
[![lang: PHP 8.5](https://img.shields.io/badge/lang-PHP%208.5-brightgreen.svg)](https://www.php.net/releases/8.5/)
66
[![Build Status](https://github.com/emacs-php/php-mode/workflows/CI/badge.svg)](https://github.com/emacs-php/php-mode/actions)
77
[![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)][gpl-v3]<br>
88
[![NonGNU ELPA][nongnu-elpa-badge]][nongnu-elpa]
@@ -30,8 +30,8 @@ Please submit any bug reports or feature requests by creating issues on [the Git
3030

3131
## Installation
3232

33-
**PHP Mode works with Emacs 27.1 or later.** For details on supported versions, see [Supported Version].
34-
On Emacs 28 or later, you can install it simply by running:
33+
**PHP Mode works with Emacs 28.1 or later.** For details on supported versions, see [Supported Version].
34+
On Emacs 28.1 or later, you can install it simply by running:
3535

3636
```
3737
M-x package-install php-mode

lisp/php-align.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
;; Maintainer: USAMI Kenta <tadsan@zonu.me>
88
;; Keywords: php languages convenience align
99
;; Homepage: https://github.com/emacs-php/php-mode
10-
;; Version: 1.26.1
10+
;; Version: 1.28.0
1111
;; License: GPL-3.0-or-later
1212

1313
;; This program is free software; you can redistribute it and/or modify

lisp/php-complete.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;; Author: USAMI Kenta <tadsan@zonu.me>
77

88
;; Created: 18 Sep 2022
9-
;; Version: 1.26.1
9+
;; Version: 1.28.0
1010
;; Keywords: languages, php
1111

1212
;; This program is free software; you can redistribute it and/or modify

lisp/php-defs.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: USAMI Kenta <tadsan@zonu.me>
66
;; Created: 5 Mar 2022
7-
;; Version: 1.26.1
7+
;; Version: 1.28.0
88
;; Keywords: languages, php
99

1010
;; This program is free software; you can redistribute it and/or modify

lisp/php-face.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: USAMI Kenta <tadsan@zonu.me>
66
;; Created: 5 May 2019
7-
;; Version: 1.26.1
7+
;; Version: 1.28.0
88
;; Keywords: faces, php
99
;; Homepage: https://github.com/emacs-php/php-mode
1010
;; License: GPL-3.0-or-later

lisp/php-flymake.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: USAMI Kenta <tadsan@zonu.me>
66
;; Created: 5 Mar 2022
7-
;; Version: 1.26.1
7+
;; Version: 1.28.0
88
;; Keywords: tools, languages, php
99

1010
;; This program is free software; you can redistribute it and/or modify

0 commit comments

Comments
 (0)