Home  >  Article  >  Development Tools  >  About composer version stability

About composer version stability

藏色散人
藏色散人forward
2020-07-27 13:13:152470browse

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 The 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
597c4c0b4b9d3cf7949aa580e564a9b8=1.0.0.0-dev 7bda4a13322ff12d12f30c3e39734a26=1.3.0.0-dev f4cc14b7a762e252d70c4e52506083ce=1.4.0.0-dev <1.5.0.0-dev
##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"
    }
}

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

Statement:
This article is reproduced at:runoob.com. If there is any infringement, please contact admin@php.cn delete