NonGNU-devel ELPA - php-mode

php-mode Atom Feed

Description
Major mode for editing PHP code
Latest
php-mode-1.28.0.0.20260825.32.tar (.sig), 2026-Aug-25, 950 KiB
Maintainer
USAMI Kenta <tadsan@zonu.me>
Website
https://github.com/emacs-php/php-mode
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

`php-mode' is a major mode for editing PHP script.  Unlike the legacy
`php-cc-mode' (kept for backward compatibility in lisp/php-cc-mode.el),
this implementation does NOT depend on CC Mode.  Indentation is handled
by the `syntax-ppss'-based engine in php-indent.el, coding styles by
php-style.el, and the PHP vocabulary comes from php-keywords.el.

This mode is designed for PHP scripts consisting of a single <?php
block.  We recommend Web Mode for HTML and Blade templates mixed with
PHP.  http://web-mode.org/

Old versions

php-mode-1.26.1.0.20260824.114.tar.lz2026-Aug-24 127 KiB
php-mode-1.26.1.0.20260810.112.tar.lz2026-Aug-10 126 KiB
php-mode-1.26.1.0.20260804.86.tar.lz2026-Aug-04 114 KiB
php-mode-1.26.1.0.20260724.81.tar.lz2026-Jul-24 112 KiB
php-mode-1.26.1.0.20260719.80.tar.lz2026-Jul-19 112 KiB
php-mode-1.26.1.0.20260709.53.tar.lz2026-Jul-0998.5 KiB
php-mode-1.26.1.0.20251112.64638.tar.lz2025-Nov-1297.3 KiB
php-mode-1.26.1.0.20241219.164506.tar.lz2024-Dec-1996.9 KiB
php-mode-1.25.1.0.20240911.185503.tar.lz2024-Sep-1195.5 KiB
php-mode-1.24.3.0.20230616.191943.tar.lz2023-Jun-16 101 KiB

News

Changes for PHP Mode by Version

This file documents notable changes to PHP Mode according to the Keep a Changelog 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

[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]) ... ...