Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to update the reduced version of composer update

Shulou Source: shulou.com Published: 2022-06-02 14:43:21 10月29日 Update

Learn how composer update updates the reduced version? This problem may be often seen in our daily study or work. I hope you can gain a lot from this article. Here is the reference content brought by the editor. Let's take a look at it!

1. Originally wanted to upgrade to 5.0.23, update directly to 5.1.31 in the root directory feels that the version is a little high, want to reduce to 5.0.23 solution is as follows:

Go to the root directory vim and open the composer.json file

"require": {"php": "> = 5.4.0", "topthink/framework": "^ 5.0", "topthink/think-captcha": "^ 1.0", "topthink/think-image": "^ 1.0", "topthink/think-helper": "^ 1.0", "ezyang/htmlpurifier": "^ 4.9"}

Mainly look at this code. If you want to update to the desired version, you only need to modify topthink/framework

Explanation: the ^ before "^ 5.0" will directly detect the latest version update.

Modify method 1: "topthink/framework": "5.0.*" remove the preceding ^ followed by *, indicating that it is updated to 5.0. The latest version of

Modification method 2: "topthink/framework": "5.0.23" specified version, which means to update to version 5.0.23

Running result:

Thank you for reading the above, do you have a general understanding of the article "how to update the reduced version of composer update"? I hope the content of the article will be helpful to you. If you want to know more about the content of the article, you are welcome to follow the industry information channel.

Tags: Versions updates content articles methods root directories upgrades code feelings files solutions more read it articles results industry information information channels questions channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Apple Linux Xiaomi vpn