#!/bin/bash
# Composer 镜像配置 - 华为云
# 由 镜像加速站 自动生成

echo "正在配置 Composer 镜像源..."

# 全局配置
composer config -g repo.packagist composer https://mirrors.huaweicloud.com/repository/php/

# 验证配置
echo "\n当前配置："
composer config -g repo.packagist

echo "\n✅ Composer 镜像源已成功配置为 华为云"
echo "如需恢复官方源，执行: composer config -g --unset repos.packagist"