phpactor / language-server-phpstan-extension
Standalone Language Server and Phpactor Extension
Installs: 844
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 2
Open Issues: 3
Type:phpactor-extension
Requires
- php: ^7.3 || ^8.0
- amphp/process: ^1.1
- phpactor/container: ^2.0.0
- phpactor/language-server-extension: ^0.6.0
- thecodingmachine/safe: ^1.1
Requires (Dev)
- amphp/phpunit-util: ^1.4
- friendsofphp/php-cs-fixer: ^2.17
- phpactor/test-utils: ^1.1.3
- phpstan/phpstan: ~0.12.0
- phpunit/phpunit: ^9.1
This package is auto-updated.
Last update: 2022-03-24 16:41:47 UTC
README
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.