composer.json settings to only use stable Yii 2

What needs to be set in composer.json so that a composer update will only download the latest stable version of Yii2?

Currently I have minimum-stability at dev and yiisoft/yii2 at *

I guess going along with this, would it be safe to have composer update automatically update minor versions of Yii2? Or should I not let composer ever update Yii without me explicitly allowing it to? This is more of a question of, what kind of changes to Yii will be made in minor versions? Bug fixes only or will API’s change?


If semver is strictly followed "~2.0@stable" should be sufficiend.

Otherwise "2.0.*@stable". You can leave the "@stable"-part out if you change the package requirement: