Yii2 Composer is broken!

I have the latest version of Yii2 Advanced installed.

I have tried to install JUI and Bootstrap using composer and the install fails each time.

The errors are always as follows:


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


  Problem 1

    - yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl

e -> no matching package found.

    - yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl

e -> no matching package found.

    - Installation request for yiisoft/yii2 == 2.0.3.0 -> satisfiable by yiisoft

/yii2[2.0.3].


Potential causes:

 - A typo in the package name

 - The package is not available in a stable-enough version according to your min

imum-stability setting

   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f

or more details.


Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common

 problems.


Installation failed, reverting ./composer.json to its original content.

[size=“5”][size=“2”];)[/size]

[/size]

Is asset plugin for Composer installed globally and up to date?

It says that it wants install the ‘stable’ version of some dependencies but fails.

Do you have minimum-stability set?

And how did you try to install those packages?

Exact command-line would be helpful.

got the same error while installing yii itself:


composer create-project yiisoft/yii2-app-advanced root

Installing yiisoft/yii2-app-advanced (2.0.3)

  - Installing yiisoft/yii2-app-advanced (2.0.3)

    Loading from cache


Created project in root

Loading composer repositories with package information

Installing dependencies (including require-dev)

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


  Problem 1

    - yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.0, 2.0.1, 2.0.2, 2.0.3].


Potential causes:

 - A typo in the package name

 - The package is not available in a stable-enough version according to your minimum-stability setting




"minimum-stability": "stable",

solved. need to install the Composer Asset Plugin first:


php composer.phar global require "fxp/composer-asset-plugin:1.0.0"

It’s really odd that it didn’t give you a clear error message!

Is there any reason why the person who raised the question had to register again as a newbie and post the answer OR am I mistaken?

danny.boy found the correct solution.

The solution suggested by Danny works, however it generate deprecated warnings for asset plugin.

There is a new updated version. Use this line instead to fix the problem:


php composer.phar global require "fxp/composer-asset-plugin:1.0.3"

If you carefuly follow Yii installation instructions, you can see that you have to install Composer Asset Plugin:


php composer.phar global require "fxp/composer-asset-plugin:~1.0.3"

the problem is is that this command throws following errors:




Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar:///media/ubuntu/data/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php:17


Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///media/ubuntu/data/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17




No, the problem is that you are using the wrong version of the asset plugin.

Try using "1.1.1" "1.1.3"

"1.0.3" is from the Stone Age…

use this command to update asset plugins


php composer.phar global update fxp/composer-asset-plugin --no-plugins

please help me

I install yii2fullcalendar but I cannot update composer.json and cannot update fxp/composer-asset

-plugin and show me this error

"|–interactive] [–root-reqs] [–] [<packages>]…

Loading composer repositories with package information

Updating dependencies (including require-dev)

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

Problem 1

- yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable

| 1.11.*@stable -> no matching package found.

- yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable

| 1.11.*@stable -> no matching package found.

- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl

e -> no matching package found.

- yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable

| 1.11.*@stable -> no matching package found.

- Installation request for yiisoft/yii2 &gt;=2.0.6 -&gt; satisfiable by yiisoft/yi

i2[2.0.6, 2.0.7, 2.0.8]."

php composer.phar global require "fxp/composer-asset-plugin:*"

the asterisk do the trick as it gives the latest version, and my issue has been resolve.