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

Using symfony php as phpstan.phpPath, to handle different PHP versions? #19

Open
gremo opened this issue Oct 26, 2022 · 0 comments
Open

Comments

@gremo
Copy link

gremo commented Oct 26, 2022

I've a lot of project using different php version (from 5.5 to 8.1).

Thanks to Symfony CLI tool, I can specify the PHP version in the project .php-version file, and use symfony php to run PHP commands with the right version.

I've tryed to use symfony php as executable with this extension:

{
  "intelephense.environment.phpVersion": "8.1",
  "php.suggest.basic": false,
  "php.validate.enable": false,
  "phpstan.phpPath": "symfony php",
}

But it doesn't work:

# [error] Error: spawn symfony php ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Any chance to make it work?

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