emacs-php/phpstan.el

error : "Could not open input file: analyze"

kermorgant opened this issue · 2 comments

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.

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

@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.