Composer 资料索引


Composer 资料索引


正文

有时会在网络上看到一些比较好的资料,转载过来有不太方便,所以在这里收录一下,以备查询。

https://getcomposer.org/ Composer官网

https://zhuanlan.zhihu.com/p/146098881 Composer的自动加载详解

https://zhuanlan.zhihu.com/p/37085149 PHP/Composer是如何加载一个类的

https://zhuanlan.zhihu.com/p/30785203 彻底搞懂Composer自动加载原理

升降级

查看所有配置 composer config -g -l

查看版本 composer --version

升级到版本2 composer self-update

降级到版本1 composer self-update --1

国内镜像

https://www.jeeinn.com/2021/06/1568/ composer常用国内镜像源及全局设置

查看当前源地址

composer config -g -l repo.packagist

阿里云

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

华为云

composer config -g repo.packagist composer https://repo.huaweicloud.com/repository/php/

腾讯云

composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/

cnpkg(每分钟)

composer config -g repos.packagist composer https://php.cnpkg.org

Composer中文网(每分钟)

composer config -g repo.packagist composer https://packagist.phpcomposer.com

上海交大(每80分钟)

composer config -g repos.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn

恢复默认源

composer config -g –unset repos.packagist

操作

安装指定版本包

composer require endroid/qr-code 1.9.3

移除版本包

composer remove endroid/qr-code


返回