本文介绍了通过composer安装yii2-braintree的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过composer成功安装了Braintree组件,现在我希望也使用composer安装。

I've installed the Braintree component via composer successfully, and now I wish to install, also using composer, the yii2-braintree.

我按照建议插入了 bryglen / yii2-braintree: *我的 composer.json 要求部分中的行:

I inserted, just like it's recommended, the "bryglen/yii2-braintree": "*" line in the require section of my composer.json:

"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "*",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "braintree/braintree_php": "2.37.0",
    "bryglen/yii2-braintree": "*"
},

之后,我执行 composer update ,结果为:

After that, I executed composer update and the result was:

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.

我在做什么错?仓库有问题吗?

What am I doing wrong? Is there a problem with the repo?

推荐答案

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

"minimum-stability": "dev"

似乎丢失了。此扩展程序尚未发布稳定版本。

Seems like it's missing. This extension doesn't have stable releases yet.

仅安装 yii2-braintree braintree_php 将作为具有静态版本- 2.30.0 的依赖项安装。

Install just yii2-braintree, braintree_php will be installed as dependency with static version - 2.30.0.

这篇关于通过composer安装yii2-braintree的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 04:40