Composer installs: how to move from dev to stable Yii2


Now thay Yii2 is finally out most of people who installed Yii 2 using Composer will want to move from the "development" branch to the stable one.

How to do that? Just change the line

"minimum-stability": "dev",

to "production" and run composer update?

What about kartik-v/yii2-app-practical apps?

I’m not sure about kartik-v/yii2-app-practival apps but there are upgrade instructions provided by the devs that tells you exactly what you need to do depending on the version you are currently using (beta or rc)

Thanks, but beside what changed in the library I’d like to know how to fix composer.json file to fetch Yii 2 stable, and that README doesn’t seem to cover the issue.

Yeah you’re right it doesn’t talk about that.

Well you can keep it at dev and it will work but it will download latest commit (even those that are newer than 2.0). That shouldn’t really be a problem though since 2.0 should be backward compatible from now on.

If you only want changes that are stable (say, for a production website), you should change (in composer.json)

"minimum-stability": "dev",


"minimum-stability": "stable",


"minimum-stability": "~2.0@stable",

Problem is, if you change the minimum stability to stable, everything else in composer.json will also have to be stable. If that is not the case, you will have to specify the exact version for anything that is not stable.