通过 Composer 安装 2amigos datepicker 时出现的问题

Problems when installing 2amigos datepicker via Composer

我正在尝试在 Yii2 中安装 2amigos date picker,但出现以下错误:

C:\xampp\htdocs\advanced>php composer.phar require "2amigos/yii2-date-picker-widget" "*"
./composer.json has been updated
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.2 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.
    - Installation request for yiisoft/yii2 == 2.0.2.0 -> satisfiable by yiisoft/yii2[2.0.2].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

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

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

我已经尝试编辑 composer.json 文件,将 minimum-stability 更改为 dev,但这仍然不起作用。

确保使用以下命令安装作曲家资产插件:

composer global require "fxp/composer-asset-plugin:1.0.0"

应该只执行一次。

official guide and plugin official documentation 阅读更多内容。

如果在安装过程中出现其他问题,请使用 self-update 命令将 composer 更新到最新版本。