Install Yii 2.0 Using Composer

I’ve been trying to install yii2.0 using composer:

composer require --prefer-dist "yiisoft/yii2 *"

I then get the error message "the requested package yiisoft/yii2 could not be found in any version, there may be a typo in the package name."

My composer.json just has a 'name" field.

{ "name": "vendor/project"}

What am I doing wrong?

Have you set

"minimum-stability": "dev"

(or "beta") in composer.json?

Yii2 does not have stable release yet, so you need to lower the minimum stability in order to install.

You have to add "–stability=dev" to the command for now.

Oh … uh … yes, that’s right … I knew that … just forgot about it. I’m only using composer since yii2.

Thanks guys!