如何升级composer
yii2 2022-11-16 12:10:19

 (1)先获取composer安装地址

C/C++ Code复制内容到剪贴板
  1. composer -h  

 

 

 

The "composer/installers" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.

The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.

The "endroid/installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.

Description:

  List commands

 

Usage:

  list [options] [--] [<namespace>]

 

Arguments:

  namespace                      The namespace name

 

Options:

      --raw                      To output raw command list

      --format=FORMAT            The output format (txt, xml, json, or md) [default: "txt"]

      --short                    To skip describing commands' arguments

  -h, --help                     Display help for the given command. When no command is given display help for the list command

  -q, --quiet                    Do not output any message

  -V, --version                  Display this application version

      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output

  -n, --no-interaction           Do not ask any interactive question

      --profile                  Display timing and memory usage information

      --no-plugins               Whether to disable plugins.

      --no-scripts               Skips the execution of all scripts defined in composer.json file.

  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.

      --no-cache                 Prevent use of the cache

  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

 

Help:

  The list command lists all commands:

  

    /usr/bin/composer list

  

  You can also display the commands for a specific namespace:

  

    /usr/bin/composer list test

  

  You can also output the information in other formats by using the --format option:

  

    /usr/bin/composer list --format=xml

  

  It's also possible to get raw list of commands (useful for embedding command runner):

  

    /usr/bin/composer list --raw

 

 

 

(2)再用(1)获取的地址,composer self-update命令进行升级:

 

C/C++ Code复制内容到剪贴板
  1. /usr/bin/composer self-update  

 

 

Upgrading to version 2.4.4 (stable channel).

   

Use composer self-update --rollback to return to version 2.4.1

 

 

本文来自于:http://www.yoyo88.cn/study/yii2/642.html

Powered by yoyo苏ICP备15045725号