|
1 | 1 | # Changes for PHP Mode by Version |
2 | 2 |
|
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. |
4 | 4 |
|
5 | | -## Unreleased |
| 5 | +<!-- ## Unreleased --> |
| 6 | + |
| 7 | +## [1.28.0] - 2026-08-25 |
6 | 8 |
|
7 | 9 | ### Added |
8 | 10 |
|
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]) |
23 | 18 |
|
24 | 19 | ### Changed |
25 | 20 |
|
26 | 21 | * Add `readonly` class modifier to [Imenu] ([#802]) |
27 | 22 | * Add `enum` support to `php-current-class` ([#802]) |
28 | 23 | * 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]) |
45 | 29 |
|
46 | 30 | ### Fixed |
47 | 31 |
|
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]) |
77 | 40 |
|
78 | 41 | ### Deprecated |
79 | 42 |
|
80 | 43 | * `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 |
81 | 44 |
|
| 45 | +### Removed |
| 46 | + |
| 47 | + * Drop support for Emacs 27.x ([#811]) |
| 48 | + |
82 | 49 | [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 |
83 | 52 | [#802]: https://github.com/emacs-php/php-mode/pull/802 |
84 | 53 | [#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 |
85 | 69 |
|
86 | 70 | ## [1.27.0] - 2024-12-20 |
87 | 71 |
|
|
0 commit comments