【问题标题】:Issue on installing yii2-braintree via composer通过 composer 安装 yii2-braintree 的问题
【发布时间】:2015-02-05 17:44:47
【问题描述】:

我已经通过 composer 成功安装了 Braintree 组件,现在我想使用 composer 安装 yii2-braintree

正如推荐的那样,我在 composer.jsonrequire 部分插入了 "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-braintreebraintree_php 是作为依赖安装的。是的,版本是静态的 - 2.30.0
  • 谢谢,@arogachev。如果你愿意,你可以回答这个问题。

标签: composer-php braintree


【解决方案1】:

确保您的 composer.json 中有此设置:

"minimum-stability": "dev"

好像没了。这个扩展还没有稳定的版本。

只安装yii2-braintreebraintree_php 将作为静态版本的依赖安装 - 2.30.0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-30
    • 2015-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-29
    • 2014-10-04
    • 2013-12-27
    相关资源
    最近更新 更多