Yii2 installation using composer giving error

I am trying to install Yii2 alpha. When I run the following command after loading the composer and adding

"minimum-stability": "dev" 

to composer.json.

 $ php composer.phar require yiisoft/yii2-framework "*" 

I get the following error.

Problem 1 - The required minimum package stability cannot be found in any version; there may be a typo in the package name.

Problem 2 - The requested yiisoft / yii2-composer package cannot be found in any version; there may be a typo in the package name.

Problem 3 - The requested yiisoft / yii2-framework package was not found in any version, there may be a typo in the package name.

Potential reasons : - A typo in the package name - The package is not available in a sufficiently stable version in accordance with the minimum stability setting, see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.

Read more at http://getcomposer.org/doc/articles/troubleshooting.md .

Please help me.

+8
php yii yii2
source share
2 answers

start with

 php composer.phar init 

and set the minimum stability [] to dev

then

 php composer.phar require yiisoft/yii2 "*" 
+8
source share

The composer.json code works here

 { "name": "yiisoft/yii2-app-advanced", ... "minimum-stability": "dev", "require": { "php": ">=5.4.0", "yiisoft/yii2": "*", }, "require-dev": { "yiisoft/yii2-debug": "*", "yiisoft/yii2-gii": "*" }, ... } 

Use yii2 against the yii2-framework, maybe you’ve got "minimal stability" in the wrong place. And you do not need the yii2-composer type, it will be installed automatically

+6
source share

All Articles