-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Change php version used by composer on windows #6277
Comments
Please explain what this means, where this information comes from, or what you are basing this on. Because it makes zero sense without any actual context. |
@crashbdx the PATH value should contain the directory of the php.exe, not the full path including php.exe, just in case there is some confusion there. Composer is not at fault in any case as this is OS/shell-level resolution. If you're on windows you can type |
@denisdulici such requests should really be posted to composer/windows-setup. Then @johnstevenson can have a look at it and see how feasible it is :-) |
the only way is to uninstall and install it again 😉 work for me |
You can change php version of composer without uninstalling it, follow these steps :
|
IMO there is no need to switch the environment variables just for running composer commands with a different PHP Version (which were not set in your env paths.). Just run your This should do it if you have composer installed globally:
|
DependencyResolver easily eats up over 1GB and 32bit php is limited to 2GB memory use and oddly enough I get fatal errors near 1.3GB, so I have to use a 64bit php just for composer. So according to this (and this: composer/windows-setup#72) topic the devs apparently don't care about this sort of problem and want you to change your whole system's environment to a different php... noice... The only workaround seems to be the one mentioned by @linslin even though one can end up with monsters like this (using GitBash on windows): /c/php/php-7.2.9-Win32-VC15-x64/php.exe -d memory_limit=-1 "c:\ProgramData\ComposerSetup\bin\composer.phar" update Really, am I supposed to write this instead of "composer update"? Legit. |
@RahulDey12 check both the user list and the system list. Both provide values for the PATH variable. |
Same has @RahulDey12 I can't find it, even on user list and system list! Where the heck did Composer created that link 😲 ? |
Hi. My project is has this error. "Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.9". You are running 8.0.22. in C:\OSPanel\domains\task-manager\vendor\composer\platform_check.php on line 24" |
Hi everyone,
I don't understand why my composer is using a 5.4.45 php version when i don't see such version on my computer, i use wamp with php 5.6.25 , in my environmemt variable i have the this version on top of the list of path value.
Is there a want to change the version composer is using please ?
The text was updated successfully, but these errors were encountered: