Closed grandeljay closed 6 months ago
Moved to windows-setup repo, maybe @johnstevenson has a clue. I'd tend towards "your setup is weird" but I am not familiar with Laragon and I haven't been running php outside of WSL in quite a few years now so 🤷🏻
Right now, I always need to remove the PHP executable from my PATH environment variable after every composer/php update.
To update Composer you should use the command composer self-update
. Running an update through Chocolately will also install the latest PHP, because the Chocolatey Composer package has a dependency on it.
I suggest that you uninstall the Choclolatey Composer package and do a manual installation, as described in the docs: https://getcomposer.org/doc/00-intro.md#using-the-installer
Thank you both for your valuable feedback!
I think I will try a compromise and pin the composer package (so chocolatey stops updating it) and I will simply use the composer self-update
command in the future.
Hello!
I couldn't fit what I wanted to say into the issue template so I hope you will excuse me for not using it.
I am using Laragon on Windows which already comes bundled with PHP. When installing composer, it automatically installs PHP to
C:\tools
. Alternatively, I can specify an already installed PHP but it must be an.exe
file.This is already not possible with my setup, since I need to switch between different PHP version frequently, depending on which project I am working on and as such, I have created a
.bat
file, to point to the desired php executable I would like to use (and I set it in my PATH environment variable).When Composer (or more specifically PHP) is updating, it keeps adding the environment variable to
C:\tools
, and so when I use the CLI, it's often set to the newest PHP version, instead of the version I want to use.Right now, I always need to remove the PHP executable from my PATH environment variable after every composer/php update.
An ideal solution for me would be any of the following options:
.bat
file as a PHP-executableIs my setup just weird/wrong or is this an issue with composer or php?
In any case, your advice is very appreciated!
Thank you for your eye balls.