How to assign / set specific php version to composer? [duplicate]

ε祈祈猫儿з 提交于 2019-12-13 07:20:02

问题


I have multiple versions of php installed on my wamp . now I am running PHP 7.0.15 as you can see in screenshot, but the laravel I am using is still taking 5.5.12 and I am unable t use laravelcollective .

OS : Windows 10 Pro

How I can fix it ?

Updated information

E:\work\www\my-project>php --version
PHP 5.4.45 (cli) (built: Sep  2 2015 23:48:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

so, it seems my project is using 5.4.45 command line. may be I need to change it ? but having no idea of it.


回答1:


SOLVED, I fixed it by changing the %PATH% environment variable to fix it . I added path of all php versions I have to %PATH%, as per my requirement I can arrange it from top to bottom, as CLI will take the first one it will get from Top to bottom in environment variable setting.

please check this to have a better idea about my solution.



来源:https://stackoverflow.com/questions/41908492/how-to-assign-set-specific-php-version-to-composer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!