Is there any way to install Composer globally on Windows?

后端 未结 13 1534
予麋鹿
予麋鹿 2020-11-30 18:32

I\'ve read the global installation documentation for Composer, but it\'s for *nix systems only:

curl -s https://ge         


        
13条回答
  •  醉梦人生
    2020-11-30 19:09

    Sure. Just put composer.phar somewhere like C:\php\composer.phar, then make a batch file somewhere within the PATH called composer.bat which does the following:

    @ECHO OFF
    php "%~dp0composer.phar" %*
    

    The "%*" repeats all of the arguments passed to the shell script.

    Then you can run around doing composer update all ya want!

提交回复
热议问题