阿里云镜像:
全局配置:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置:
composer config -g --unset repos.packagist
项目配置(仅针对当前工程):
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置:
composer config -g --unset repos.packagist
或者这个
composer config -g repo.packagist composer https://packagist.phpcomposer.com
参考https://pkg.phpcomposer.com/#how-to-use-packagist-mirror
个人感觉,阿里云镜像非常快,但好像不全的样子,比如我在安装workerman时,竟然提示没有。。没有。。。
安装中碰到的问题
我在安装tp6的时候,报错提示:
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
解决方法:
php配置文件php.ini,找到
disable_functions=exec,passthru,popen,proc_open,shell_exec,system,assert
删除后面的proc_open,然后重启