PHP之Composer
Composer
php的包管理器,相关网址:
https://www.phpcomposer.com/
https://pkg.phpcomposer.com
https://getcomposer.org
https://packagist.org
中国镜像:
https://mirrors.aliyun.com/composer/index.html
https://mirrors.huaweicloud.com/
https://mirrors.cloud.tencent.com/help/composer.html
安装:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
测试:
composer --version
使用中国镜像:
composer config -g repos.packagist composer https://php.cnpkg.org
常用命令:
安装
composer require 包
更新
composer update
移除
composer remove 包
慎用composer update 这个命令,会更新所有的包,一般建议安装新的包,建议使用composer require 安装。
并将composer.lock上传到git项目里,同事可以直接拉取到composer.lock ,然后直接composer install 即可。
文章版权声明:除非注明,否则均为彭超的博客原创文章,转载或复制请以超链接形式并注明出处。
继续浏览有关 php 的文章
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。