You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package adds support of phan (0.12.0+), the PHP static analyzer, to Emacs (as a flycheck plugin).
The main feature is quick analysis of individual php files in a project, with the assistance of a background phan daemon.
Then, start the daemon in the folder to analyze, with the default port of 8486 (see phan/phan#563)
TODO: add a way to configure individual project settings
(e.g. .dir-locals.el)
This should be enough to have the flycheck checker run on your project.
This will run while the project is being edited, even without saving the file.
Note: The request frequency may still need to be tuned for larger projects.
Configuration
You need to install phan manually, and use a git branch with the phan daemon installed.
Ensure that the PHP program phan_client is in your path, or copied to a folder in your $PATH.
Currently, the phan daemon must be started manually on the directory
(must have .phan/config.php somewhere in the folder or parent folders).
No warning/notice is currently emitted if the daemon is not running.
Type M-x customize-group RET phanclient RET to see the other customization options.
More customization options will be added in the future.
Requirements
PHP 7.x with the php-ast extension installed (and in the PATH emacs searches for binaries).