Sometimes we might need to use a new repository for Composer's packages, for example, in a private environment, or countries like China.
In this tutorial, we will show you how to update the packages' repository for Composer.
It is as simple as two steps to update:
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
composer update --lock
Now your Composer will be reading packages from the updated repository https://mirrors.aliyun.com/composer/. Hope you find this article useful.