Composer鏡像

阿里云鏡像

全局配置(推薦)

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

配置當(dāng)前項(xiàng)目

composer config repo.packagist composer https://mirrors.aliyun.com/composer/

取消配置

composer config -g --unset repos.packagist

調(diào)試

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>]...

檢查發(fā)現(xiàn)composer版本過(guò)低了

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

查看當(dāng)前版本

Mac-mini:households zidung$ composer --version
Composer version 1.9.0 2019-08-02 20:55:32

重新執(zhí)行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%)    
.
.
.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容