Not able to run CodeSniffer & PHPMD with remote interpreter
Hi, im using a Dev Env with Windows 10 + PhpSotrm 2017.2 + Vagrant on my current job.
On PhpStorm we have:
- We have Remote PHP CLI interpreter configured and working correctly.
- We have a PHP Server configured correctly and with absolute path mapping
- We have a SFTP Deployment configuration pointing to vagrant with correct mappings
And we have some Run/Debug Configurations configured to run Codeception tests and it works correctly.
If i install Code Sniffer and PHPMd by composer and i configure Run/Debug configurations, it works well, but i wanna have them working as inspections.
If i mark their checks on php inspections i get following errors:
PHP Mess Detector
phpmd: The given file "/home/vagrant/.phpstorm_helpers/phpmd_temp.tmp/app/Api/v1/Controllers/BaseController.php" does not exist.
PHP Code Sniffer
phpcs: ERROR: The file "/home/vagrant/.phpstorm_helpers/phpcs_temp.tmp/app/Api/v1/Controllers/BaseController.php" does not exist.
If i manually ssh to the vagrant, i dont see the "phpcs_temp.tmp" or "phpmd_temp.tmp" folders created, i have tried many things, different interpreters, etc... i can not solve it.
On the PhpStorm logs i cannot see anything that gives me more info that those two messages.
Thanks!
Please sign in to leave a comment.
Do you have `/home/vagrant` included into a project?
What do you mean? Can you be more specific please?
/home/vagrant looks like the path phpstorm uses inside the vagrant machine after ssh
I also have tried doing vagrnat up from terminal and in phpstorm, same result.
Would be great if you could show the screenshots of your configuration - remote interpreter, deployment and phpmd and phpcs.
Just checked - should work fine.
CLI Interpreter
Php
Php Server
Code Sniffer and Mess Detector
Deployment
Parts hidden are repo name.
No clues or help about this?
Solved myself.
Adding a new volume to the docker container in charge of php execution:
volumes:
...
- /home/vagrant/.phpstorm_helpers:/home/vagrant/.phpstorm_helpers
...