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!

 

0
6 comments

Do you have `/home/vagrant` included into a project? 

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

Would be great if you could show the screenshots of your configuration - remote interpreter, deployment and phpmd and phpcs.

Just checked - should work fine.

0
Avatar
Permanently deleted user

CLI Interpreter

Php

Php Server

Code Sniffer and Mess Detector

Deployment


Parts hidden are repo name.

0
Avatar
Permanently deleted user

No clues or help about this?

0
Avatar
Permanently deleted user

Solved myself.

Adding a new volume to the docker container in charge of php execution:

volumes:

...

- /home/vagrant/.phpstorm_helpers:/home/vagrant/.phpstorm_helpers

...

0

Please sign in to leave a comment.