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

[Bug]: Isolated PHP version is not used in VSCode. #1205

Closed
MGeurts opened this issue Dec 18, 2024 · 3 comments
Closed

[Bug]: Isolated PHP version is not used in VSCode. #1205

MGeurts opened this issue Dec 18, 2024 · 3 comments
Labels

Comments

@MGeurts
Copy link

MGeurts commented Dec 18, 2024

Platform

Windows

Operating system version

Windows 11 24H2

System architecture

Intel (x86)

Herd Version

1.0.13

PHP Version

PHP 8.4 (isolated) and 8.3.14 (global)

Bug description

When configuring certain sites with a non-global PHP version, still the global version is used in VSCode.

HERD - PHP Versions

Although the site genealogy.test is set to use PHP 8.4, in VSCode it still uses the global PHP version 8.3.14.

HERD - PHP Versions - 2

Steps to reproduce

No response

Relevant log output

No response

@issuelabeler issuelabeler bot added the windows label Dec 18, 2024
@MGeurts
Copy link
Author

MGeurts commented Dec 18, 2024

Even creating a herd.yml file in the repository folder by using herd init and restarting the Herd services, does not solve the problem.

Herd - which-php reports PHP 8.4.

HERD - PHP Versions - 4

Below the path variable on my Windows machine:

D:\DEVELOPMENT\genealogy>path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Users\marcg\.config\herd\bin\nvm;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Program Files\MySQL\MySQL Server 9.1\bin;C:\Users\marcg\.config\herd\bin;C:\Users\marcg\AppData\Local\UniGetUI\Chocolatey\bin;C:\Users\marcg\AppData\Local\Microsoft\WindowsApps;C:\Users\marcg\AppData\Local\Programs\Microsoft VS Code\bin

@MGeurts
Copy link
Author

MGeurts commented Dec 20, 2024

The same happens with node.js versions.

@mpociot
Copy link
Member

mpociot commented Dec 20, 2024

Well this is a configuration issue within VSCode then.
The isolation feature allows you to run
"herd php" or "herd composer" commands so that they will use the project specific PHP version.

For node, you can run "npm use" in a folder that is isolated to automatically switch to its node version.

You would need to configure VSCode yourself to use specific PHP binaries as that's out of the scope of Herd.

@mpociot mpociot closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants