Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

About

Phpstan Language Server (standalone and Phpactor extension)

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

49 Commits

Folders and files

Repository files navigation

LanguageServerPhpstan

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.

About

Phpstan Language Server (standalone and Phpactor extension)

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages