Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use phpstan in docker env #24

Open
AndreiOrmanji opened this issue May 1, 2023 · 0 comments
Open

Can not use phpstan in docker env #24

AndreiOrmanji opened this issue May 1, 2023 · 0 comments

Comments

@AndreiOrmanji
Copy link

Description:

I'm trying to set-up to use docker environment to execute phpstan checks.

I'm receiving the following output:

[client] Starting extension with configuration: {
	"binPath": "vendor/bin/phpstan",
	"binCommand": [
		"/usr/bin/docker exec -it t-api php .vscode/phpstan.phar"
	],
	"configFile": ".vscode/phpstan.neon",
	"rootDir": "",
	"options": [],
	"enableStatusBar": true,
	"memoryLimit": "256M",
	"enabled": true,
	"timeout": 10000,
	"projectTimeout": 60000,
	"suppressTimeoutMessage": false,
	"paths": {
		"/SCRIPTS/t/api": "/var/www/api"
	},
	"showProgress": true,
	"enableLanguageServer": false,
	"ignoreErrors": []
}
[client] Initializing done
[server] Language server ready
[server] Language server started
[file-watcher] Document active, checking
[check:1] Check started for file:///SCRIPTS/t/api/tests/Service/Splitting/SplittingInitializerTest.php
[status-bar] Showing status bar
[check:1] Spawning PHPStan with the following configuration:  {"binCmd":"/usr/bin/docker exec -it t-api php .vscode/phpstan.phar","args":["analyse","-c","/var/www/api/.vscode/phpstan.neon","--error-format=raw","--no-interaction","--memory-limit=256M","/var/www/api/tests/Service/Splitting/SplittingInitializerTest.php"]}
[status-bar] Hiding status bar, last operation result = Error
[check:1] Check completed for file:///SCRIPTS/t/api/tests/Service/Splitting/SplittingInitializerTest.php errors= {}
[check:1] PHPStan process exited with error  filteredErr=  rawErr=  data=  errMsg=spawn /usr/bin/docker exec -it t-api php .vscode/phpstan.phar ENOENT
[file-watcher] Document active, checking
[file-manager] Not checking file "file:///SCRIPTS/t/api/tests/Service/Splitting/SplittingInitializerTest.php", file has already been checked (checkId=1)

phpstan.neon content:

parameters:
  level: 6
  paths:
    - src
    - tests

Environment:

Extension version: v2.2.23 (installed in WSL)
VSCode: 1.77.3 (running in WSL via Remote Development package on distro Ubuntu 20.04.6 LTS)
Docker version 23.0.3, build 3e7cbfd (installed directly in WSL without Docker Desktop)
OS: Windows 10 build 19043.2364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant