0

I would like to use a different PHP version than my default in my current VScode workspace for PHPstan.

PHPstan keeps using my default PHP version from my windows commandline.

The error I get is;

PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.19.

1 Answer 1

-2

You can use the key phpstan.phpPath in your workspace settings.json

Your workspace settings.json is found in the .vscode folder of your project.

The settings.json will be as follows;

{
    "phpstan.phpPath": "C:/PHP/php-8.1.6/php.exe",
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.