Home>Article>Development Tools> How to add domestic mirror in composer

How to add domestic mirror in composer

藏色散人
藏色散人 forward
2019-12-17 14:02:46 2763browse

The following tutorial column ofcomposerwill introduce you to the method of adding domestic mirrors in composer. I hope it will be helpful to friends who need it!

How to add domestic mirror in composer

Option 1. Global configuration (recommended)

$ composer config -g repo.packagist composer https://packagist.laravel-china.org

Option 2. Use alone

If only the current project uses the mirror, remove it -g, as follows:

$ composer config repo.packagist composer https://packagist.laravel-china.org https://packagist.laravel-china.org/

For more composer-related technical articles, please visit thecomposertutorial column://m.sbmmt.com/tool/composer/

The above is the detailed content of How to add domestic mirror in composer. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete