阿里云镜像
全局配置(推荐)
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
配置当前项目
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置
composer config -g --unset repos.packagist
调试
composer -vvv require alibabacloud/sdk
异常"continue" targeting switch is equivalent to "break". Did you mean to use " continue 2"
Mac-mini:households zidung$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
[ErrorException]
"continue" targeting switch is equivalent to "break". Did you mean to use "
continue 2"?
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-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版本过低了
Mac-mini:households zidung$ composer -v
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.5.2 2017-09-11 16:59:25
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
.
.
.
更新composer
Mac-mini:households zidung$ composer self-update
Updating to version 1.9.0 (stable channel).
Downloading (100%)
Use composer self-update --rollback to return to version 1.5.2
查看当前版本
Mac-mini:households zidung$ composer --version
Composer version 1.9.0 2019-08-02 20:55:32
重新执行composer update
Mac-mini:households zidung$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 77 installs, 0 updates, 0 removals
- Installing kylekatarnls/update-helper (1.2.0): Downloading (100%)
- Installing symfony/thanks (v1.1.0): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.12.0): Downloading (100%)
- Installing vlucas/phpdotenv (v2.6.1): Downloading (100%)
.
.
.