composer update 报错
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
[ErrorException]
Invalid argument supplied for foreach()
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
解决:
更换成阿里镜像:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
更换成Laravel China镜像:
composer config -g repo.packagist composer https://packagist.laravel-china.org
更换成中国全量镜像:
composer config -g repo.packagist composer https://packagist.phpcomposer.com