# Changes for PHP Mode by Version

This file documents notable changes to PHP Mode according to the [Keep a Changelog](https://keepachangelog.com/) principles.

## Unreleased

### Added

 * **Rewrite `php-mode` as a CC Mode independent major mode**
   * Indentation is handled by `php-indent.el`, a `syntax-ppss` based engine ported from `js.el` bundled with GNU Emacs
   * Coding styles are handled by `php-style.el`, a variable-based style system that replaces CC Mode's `c-set-style`
   * PHP language keyword tables are provided by `php-keywords.el`
 * Preserve the legacy CC Mode based implementation as `php-cc-mode`
   * This replaces the forward-compatibility alias introduced in 1.28.0 ([#828]) with the real renamed implementation
   * `php-cc-mode` is in frozen maintenance: only regression fixes are accepted, and new development happens in the CC Mode independent `php-mode`
   * For backward compatibility, `php-cc-mode` runs `php-mode-hook` in addition to its own `php-cc-mode-hook`
   * Settings described in [the CC Mode manual] now apply only to `php-cc-mode`; see the commentary at the top of `lisp/php-cc-mode.el`

### Changed

 * Change the default of `php-mode-coding-style` from `pear` to `per` ([PER Coding Style 2.0])

### Deprecated

 * `c-basic-offset` is obsolete in `php-mode`; use `php-indent-offset` instead
   * A migration layer still honors a buffer-local `c-basic-offset` (for example set via `.dir-locals.el`) by copying its value into `php-indent-offset` with a warning
 * `php-mode-lineup-cascaded-calls` is obsolete; use `php-indent-chain-indent` instead
 * `php-mode-enable-backup-style-variables` is obsolete; use `php-style-delete-trailing-whitespace` instead

### Removed

 * **Drop support for Emacs 27; PHP Mode now requires Emacs 28.1 or later** ([#811])
 * Remove the `symfony2` coding style from `php-mode`, which is superseded by `per`
   * The style remains available in `php-cc-mode`
   * `php-enable-symfony2-coding-style` is now an obsolete alias for `php-enable-per-coding-style`

[PER Coding Style 2.0]: https://www.php-fig.org/per/coding-style/
[the CC Mode manual]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html

## [1.28.0] - 2026-08-25

### Added

 * Add `php-phpdbg-disassemble-file` and `php-parse-file` commands ([#804])
 * 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])
 * Include `php-align.el` and `php-flymake.el` in the package ([#820])
 * Add a `php-pipe-op` face for PHP 8.5's pipe operator ([#821])
 * Add `php-ide-set-feature`, `php-ide-status`, and `php-ide-eglot-activate` commands ([#826])
 * Add `phpantom` and `php-lsp` presets to `php-ide-lsp-command-alist` ([#830])
 * Add `php-cc-mode` as a forward-compatible alias for the CC Mode based `php-mode` ([#828])

### Changed

 * Add `readonly` class modifier to [Imenu] ([#802])
 * Add `enum` support to `php-current-class` ([#802])
 * Remove hardcoding of implicit paths in `php` that are not guaranteed to exist ([#803])
 * Make `php-mode-maybe` honor `major-mode-remap-alist` ([#816])
 * Let `php-project-get-root-dir` use `project.el` backends after PHP-specific markers ([#823])
 * Make `php-ide-features` accept a bare feature symbol and make `php-ide-turn-on` a no-op when no features are configured ([#826])
 * Restrict safe directory-local PHP-IDE values and mark command and function alists as risky ([#826])
 * Warn about multiple active LSP clients and make PHP-IDE server and mode alists customizable ([#827])

### Fixed

 * Fix array alignment when an empty line is present ([#801])
 * Fix compatibility with upcoming Emacs 32 ([#809])
 * Fix PHP function completion sorting, module filtering, and directory-local validation ([#825])
 * Fix PHP-IDE feature activation, deactivation, repeated enabling, and Phpactor hover cleanup ([#826], [#827])
 * Return a valid `project.el` representation from `php-project-project-find-function` ([#823])
 * Fall back to an HTML mode for Blade templates when `web-mode` is unavailable ([#817])
...
...
