You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#9855 changed the behavior of bin-compat=auto on WSL while it shouldn't have. WSL is just a Linux virtual machine running on a Windows host, there is no reason why composer should behave differently on it than it does on any other Linux environment.
Worse, as the platform detection code is incorrect, .bat files are also added when running composer from a Docker container that runs on WSL (in that case, reading /proc/version from the container will still return a string that contains microsoft).
From what I saw, #9855 was merged to fix #9841, however #9841 should have been resolved as invalid.
As opposed to what the issue says, PHPStorm does not need .bat files to execute vendor binaries from WSL.
The reporter has a project in WSL, but is trying to run the vendor binaries using a PHP binary installed on the Windows host, which doesn't really make sense IMHO as the version of PHP installed on the host could be different than the one available in the Linux VM.
Thus I would suggest to reverse the behavior introduced by #9855 and treat WSL as any other Linux VM/environment by default. Users will still be able to set bin-compat=full if they really wish to use the vendor binaries from both the Linux and Windows side, but I believe it should not be the default behavior of bin-compat=auto.
If #9855 cannot be reversed, at least the platform detection code should be fixed so composer doesn't add .bat files to all the Linux Docker images built or executed on WSL.
The text was updated successfully, but these errors were encountered:
We could say you can also set bin-compat: symlink if you're not interested in the auto compatibility mode. But anyway I'm not so interested in debating the value of the past decisions. I do agree docker containers running inside WSL shouldn't be seen as WSL in this context. I'll get a best-effort fix out for that.
#9855 changed the behavior of
bin-compat=auto
on WSL while it shouldn't have. WSL is just a Linux virtual machine running on a Windows host, there is no reason why composer should behave differently on it than it does on any other Linux environment.Worse, as the platform detection code is incorrect,
.bat
files are also added when running composer from a Docker container that runs on WSL (in that case, reading/proc/version
from the container will still return a string that contains microsoft).From what I saw, #9855 was merged to fix #9841, however #9841 should have been resolved as invalid.
As opposed to what the issue says, PHPStorm does not need
.bat
files to execute vendor binaries from WSL.The reporter has a project in WSL, but is trying to run the vendor binaries using a PHP binary installed on the Windows host, which doesn't really make sense IMHO as the version of PHP installed on the host could be different than the one available in the Linux VM.
Thus I would suggest to reverse the behavior introduced by #9855 and treat WSL as any other Linux VM/environment by default. Users will still be able to set
bin-compat=full
if they really wish to use the vendor binaries from both the Linux and Windows side, but I believe it should not be the default behavior ofbin-compat=auto
.If #9855 cannot be reversed, at least the platform detection code should be fixed so composer doesn't add
.bat
files to all the Linux Docker images built or executed on WSL.The text was updated successfully, but these errors were encountered: