composer要想升级到合适版本
- 先升级到最高版本
在使用命令升级
root@iZuf66zx8tquy3643i81efZ:~# composer self-update --2.2
Storing "2.2" as default update channel for the next self-update run.
Warning: You forced the install of 2.2.23 via --2.2, but 2.7.2 is the latest stable version. Updating to it via composer self-update --stable is recommended.
Upgrading to version 2.2.23 (2.2.x channel).
Use composer self-update --rollback to return to version 2.7.2
root@iZuf66zx8tquy3643i81efZ:~# composer -V
Composer version 2.2.23 2024-02-08 15:08:53
root@iZuf66zx8tquy3643i81efZ:~#