Composer update method to update and lower the version

藏色散人
Release: 2019-12-23 14:35:31
forward
13138 people have browsed it

Below, composer uses the tutorial column to introduce to you how to update and lower the version of composer update. I hope it will be helpful to friends in need!

Composer update method to update and lower the version

1. I originally wanted to upgrade to 5.0.23. I updated in the root directory and directly upgraded to 5.1.31. I felt that the version was a bit high. I wanted to downgrade to 5.0.23. The plan is as follows :

Composer update method to update and lower the version

Enter 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"
    },
Copy after login

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

Explanation: "^5.0" The ^ in front will directly detect the latest version update

Modification method 1: "topthink/framework": "5.0.*" Remove the ^ in front and add it after *, indicating updating to the latest version of 5.0.

Modification method 2: "topthink/framework": "5.0.23" specifies the version, indicating updating to version 5.0.23

Running results:

Composer update method to update and lower the version

For more composer-related technical articles, please visit the composer column: //m.sbmmt.com/tool/composer/

The above is the detailed content of Composer update method to update and lower the version. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!