Writing PHP with Emacs

Learn how to turn a vanilla Emacs installation into a powerful PHP editing environment.
“Writing PHP with Emacs” explains which packages to install, how to use and configure them, and how to get the most out of your Emacs PHP editing setup.
Purchase at Leanpub Price: $19.99
Read a free chapter: Checking syntax (and more) with flycheck
My aim is for the book to teach you how to take a brand new Emacs installation and turn it into something tailored just for you.
The planned table of contents for the book looks a little like this. It may change over time depending on feedback.
Important: This book is a work-in-progress. All updates are free of charge to owners of the book.
Part 1 - Essential Packages
- Using php-mode
- Installation
- First Steps
- Useful shortcuts (for navigation, viewing documentation and editing code)
- Customization - indentation and coding styles
- Customization - documentation lookup
- Customization - Using TAGS files
- Evaluating inline code using php-send-region
- Running the built-in server
- Examining PHP’s configuration
- Using web-mode
- Installation
- First steps
- Useful shortcuts
- Customization - indentation
- Explanation and examples of all shortcuts
Part 2 - Getting More out of Emacs
- Checking syntax (and more) with flycheck
- Navigating projects using projectile
- Using lsp-mode
- Installing lsp-mode
- Configuring lsp-mode
- php-language-server
- intelephense
- serenata
Part 3 - Recipes
- Setting per-project settings using .dir-locals.el
- Generating HTML quickly with emmet
- Looking up documentation with dash
- Adding a project sidebar using dired-sidebar
- Configuring a Drupal 7 project
- Configuring a Drupal 8 project
- Configuring a Laravel project
- Configuring a Symfony project
- Configuring a WordPress project
Changelog
2021-04-05
- Added “Configuring a Drupal 8 project” chapter.
- Added “Configuring a Laravel project” chapter.
- Added “Configuring a Symfony project” chapter.
2021-03-31
- Added “Configuring a Drupal 7 project” chapter.
- Added “Configuring a WordPress project” chapter.
2021-02-23
- Added “Setting per-project settings using .dir-locals.el” chapter.
2021-02-06
- Added “Adding a project sidebar using dired-sidebar”
2020-12-19
- Added “Looking up documentation with dash” chapter.
2020-12-04
- Expanded lsp chapter with details on imenu.
- Added information on using Serenata.
2020-11-11
- Added initial “Using lsp for intelligent code features” chapter.
2020-09-07
- Added “Checking syntax (and more) with flycheck” chapter.
2020-07-17
- Added initial version of “Navigating projects using projectile” chapter.
2020-06-29
- Added “Generating HTML quickly with emmet” recipe.
2020-06-11
- Added initial version of
web-mode
section.
2020-05-30
- Added “Customization - Generating a TAGS file” to php-mode section.
2020-05-28
- Added “Viewing PHP’s configuration setup with
php-ini
” to php-mode section.
2020-05-23
- Added “Running the built-in server” to php-mode section.
2020-05-10
- Published initial version of the book. Contains the chapter on
php-mode
and weighs in at 2,579 words and 15 pages (in the PDF version).