Home > Development Tools > composer > About composer version stability

About composer version stability

藏色散人
Release: 2020-07-27 13:13:15
forward
2558 people have browsed it

The following tutorial column of composer will introduce to you the version stability of composer. I hope it will be helpful to friends in need!

About composer version stability

About composer version stability

If you do not explicitly specify the version For stability, Composer will internally specify -dev or -stable by default based on the operator used. For example:

##ConstraintInternal Constraint##>1.2>1.2.0.0-stable##>=1.2##>=1.2.0.0-stable ##<1.3.0.0-dev<=1.3.0.0-stable>=1.0.0.0-dev <3.0.0.0-dev##~1.3 >=1.3.0.0-dev <2.0.0.0-dev1.4.*>=1.4.0.0-dev <1.5.0.0-devThe minimum-stability configuration item defines the default behavior of the package's stability selection when selecting a version. The default is stable. Its values ​​are as follows (ordered by stability): dev, alpha, beta, RC and stable.
1.2.3 =1.2.3.0-stable
##> =1.2.0.0-dev ##>=1.2-stable
<1.3
<=1.3
1 - 2
##Example : 1.0 - 2.0If you want to specify the version as long as the stable version, you can add the suffix -stable after the version.
In addition to modifying this configuration to modify this default behavior, we can also use stability flags (such as @stable and @dev) to install a version with different stability compared to the default configuration. For example:

{
    "require": {
        "monolog/monolog": "1.0.*@beta",
        "acme/foo": "@dev"
    }
}
Copy after login

The above is the detailed content of About composer version stability. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:runoob.com
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