Composer

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(安装)
(安装)
第6行: 第6行:
 
[https://getcomposer.org/download/ 下载 Composer]
 
[https://getcomposer.org/download/ 下载 Composer]
 
  php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 
  php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
+
  php -r "if (hash_file('sha384', 'composer-setup.php') === '572cb359b56ad9ae52f9c23d29d4b19a040af10d6635642e646a7caa7b96de717ce683bd797a92ce99e5929cc51e7d5f') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
 
  php composer-setup.php
 
  php composer-setup.php
 
  php -r "unlink('composer-setup.php');"
 
  php -r "unlink('composer-setup.php');"

2020年8月16日 (日) 23:42的版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Composer Thanks, Wikipedia.

Composer 是PHP软件包管理系统,MIT许可协议。

安装

下载 Composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '572cb359b56ad9ae52f9c23d29d4b19a040af10d6635642e646a7caa7b96de717ce683bd797a92ce99e5929cc51e7d5f') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

创建 composer.json

 {
    "require": {
        "monolog/monolog": ">=1.0.0"
    }
 }

mv composer.phar /usr/local/bin/composer

运行 Composer

composer install

更新 Composer

composer self-update

回滚

composer self-update --rollback

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱