Phpstan Language Server and Phpactor Extension.
Provides Language Server diagnostics from Phpstan.
If you are using the Phpactor Language Server
$ phpactor extension:install "phpactor/language-server-phpstan-extension"
Manually install it:
$ git clone git@github.com:phpactor/language-server-phpstan-extension some/path
$ cd language-server-phpstan-extension
$ composer install
The process of enabling the server with your client will vary. If you are
using VIM and CoC it will look
something like (:CocConfig
):
{
"languageserver": {
"phpstan": {
"enable": true,
"command": "/some/path/bin/phpstan-ls",
"args": ["language-server"],
"filetypes": ["php"]
}
}
}
The extension depends on having a phpstan.neon
in your project root which
defines your projects level
and analysis paths
e.g.:
# phpstan.neon
parameters:
level: 7
paths: [ src ]
language_server_phpstan.bin
: Relative or absolute path to Phpstan. Default is'%project_root%/vendor/bin/phpstan'
This package is open source and welcomes contributions! Feel free to open a pull request on this repository.
- Create an issue on the main Phpactor repository.
- Join the
#phpactor
channel on the Slack Symfony Devs channel.