emacs-php / phpstan.el

Interface to PHPStan (PHP static analyzer)
GNU General Public License v3.0
25 stars 16 forks source link

error : "Could not open input file: analyze" #6

Open kermorgant opened 6 years ago

kermorgant commented 6 years ago

Hi,

Thank you for your work on this package.

I'm been using spacemacs (develop branch) and phpstan separately for some time, but after having discovered this package, I wanted to give it a try.

I tried with phpstan installed globally and falled back to docker, but had the same error on both attempts

Suspicious state from syntax checker phpstan: Flycheck checker phpstan returned non-zero exit code 1, but its output contained no errors: Could not open input file: analyze

Can that error message tell what is wrong with my setup ?

I'm using this in .dir-locals.el

((nil . ((php-project-root . git)
         (phpstan-executable . docker)
         (phpstan-working-dir . (root . "."))
         (phpstan-config-file . (root . "./phpstan.neon"))
         (phpstan-level . 7))))

Then, I've begun a private php layer where I initialize some things and which could contain the source of this error, but it is more a spacemacs thing so I'lle leave it out for now.

kermorgant commented 6 years ago

fired up the debugger and it seems the "phpstan-get-executable" returns null, which leads to this error message.

Seems having phpstan installed globally is not supported, right ? Then, for the docker way, I might need to setup it properly, I might have overlooked its installation

zonuexe commented 6 years ago

@kermorgant Thank you for pointing that out. The problem seems to have been resolved by your contribution. (I thought it at the time of documentation, but the implementation was missing)

Now I am on a journey to visit my old friend, so I apologize that I can not respond at once.