Table of Contents

PHP layer

Table of ContentsClose

php.png

1 Description

This layer adds PHP language support to Spacemacs.

1.1 Features:

  • Edit PHP files using php-mode
  • Edit Drupal files
  • Complete and jump to define with company-php
  • Run tests with PHPUnit
  • Reformat code with PHP CBF

The gtags layer is recommended to benefit from better eldoc and helm-gtags.

2 Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add php to the existing dotspacemacs-configuration-layers list in this file.

3 Key bindings

Key binding Description
SPC m g g jump to define at point
C-t jump back

4 Troubleshooting

Because of the way that the php-extras package works, there are a couple of simple initialization tasks which must occur to get the completion working as it should. On any new project make sure to perform the following initialization tasks:

  1. Run the following

    cd /root/of/project
    touch .ac-php-conf.json
    
  2. Inside of spacemacs run: = ac-php-remake-tags-all =

Author: Travis CI User

Created: 2019-01-22 Tue 20:42

Validate