【发布时间】:2015-02-05 17:44:47
【问题描述】:
我已经通过 composer 成功安装了 Braintree 组件,现在我想使用 composer 安装 yii2-braintree。
正如推荐的那样,我在 composer.json 的 require 部分插入了 "bryglen/yii2-braintree": "*" 行:
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"braintree/braintree_php": "2.37.0",
"bryglen/yii2-braintree": "*"
},
之后我执行composer update,结果是:
sudo composer update
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
- The requested package bryglen/yii2-braintree could not be found in any version, there may be a typo in the package name.
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.
我做错了什么? repo 有问题吗?
【问题讨论】:
-
现在安装它没有任何问题。你的
composer.json:"minimum-stability": "dev"中有这个设置吗?好像不见了这个扩展还没有稳定的版本。 -
@arogachev 是的,你是对的。但现在又出现了一个错误。您安装的 braintree_php 版本是什么?我安装了最后一个(2.37.0),为了安装 yii2-braintree,它似乎需要 2.30.0。 “找不到匹配的包”就是它显示的内容。
-
我只安装了
yii2-braintree,braintree_php是作为依赖安装的。是的,版本是静态的 -2.30.0。 -
谢谢,@arogachev。如果你愿意,你可以回答这个问题。