phpactor/language-server-phpstan-extension

This package is abandoned and no longer maintained. No replacement package was suggested.

Standalone Language Server and Phpactor Extension

0.2.4 2021-04-18 15:30 UTC

This package is auto-updated.

Last update: 2022-03-24 16:41:47 UTC


README

CI

Phpstan Language Server and Phpactor Extension.

Provides Language Server diagnostics from Phpstan.

Usage

Phpactor Extension

If you are using the Phpactor Language Server

$ phpactor extension:install "phpactor/language-server-phpstan-extension"

Standalone

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"]
        }
    }
}

PHPStan Configuration

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 ]

Configuration

  • language_server_phpstan.bin: Relative or absolute path to Phpstan. Default is '%project_root%/vendor/bin/phpstan'

Contributing

This package is open source and welcomes contributions! Feel free to open a pull request on this repository.

Support

  • Create an issue on the main Phpactor repository.
  • Join the #phpactor channel on the Slack Symfony Devs channel.