Yii 2.0.4 composer installation

I am trying to install Yii 2.0.4 package on Windows 7 PC. Having 5.6.2 XAMPP server running.

Tried to install from archive, using basic and advanced template , they run ok on localhost.

Problem is when I try to install using composer.

  1. I created new folder.

  2. Then created composer.json file.

  3. Then into cmd: [i]


composer install

[/i] (composer created lock file and vendor folder).

  1. But then when I run:

composer require yiisoft/yii2 2.0.4

I get this error:


Your requirements could not be resolved to an installable set of packages.  


Problem 1    - The requested package yiisoft/yii2 1.0.0 could not be found.


Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting

I also tried:


php C:\bin\composer.phar require yiisoft/yii2 2.0.4

but I get same error

This is my composer.json:


{

    "name": "yiisoft/yii2",

    "description": "Yii PHP Framework Version 2",

    "keywords": [

        "yii2",

        "framework"

    ],

    "type": "library",

    "license": "BSD-3-Clause",

     "require": {

        "php": ">=5.4.0"

    }

}



Problem solved, I just edited content of composer.json file




{

     "require": {

        "php": ">=5.4.0"

    }

}