Composer: required packages with differing levels of minimum-stability

前端 未结 2 451
梦如初夏
梦如初夏 2021-01-30 19:45

I have a composer file for a laravel installation with the following composer.json file:

{
    \"name\": \"laravel/laravel\",
    \"description\": \"The Laravel          


        
相关标签:
2条回答
  • 2021-01-30 20:20

    The answer is just add @dev

    {
        "require": {
            "cartalyst/sentry": "2.0.*@dev"
        },
    }
    

    You can read more about minimum stability settings here.

    An alternative is to set your minimum-stability to dev, but tell composer you want to use stable whenever possible:

    "minimum-stability": "dev",
    "prefer-stable" : true
    

    This basically means it will always use stable UNLESS there is no way to install a stable dependency, and therefore use dev.

    0 讨论(0)
  • 2021-01-30 20:20

    You can also use other levels of stability, like alpha, beta combined with version selector.

    Examples

    With caret operator - maximum of version 2 allowing beta:

    "cartalyst/sentry": "^2@beta"
    

    Any version allowing alpha

    "cartalyst/sentry": "*@alpha"
    
    0 讨论(0)
提交回复
热议问题