2015-02-05 143 views
2

我已經通過作曲家成功安裝了Braintree組件,現在我希望安裝使用作曲家的yii2-braintree通過作曲家安裝yii2-braintree的問題

我插入,就像它的建議,在"bryglen/yii2-braintree": "*"線在我composer.jsonrequire部分:

"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. 

我做錯了什麼?回購有問題嗎?

+1

現在安裝它沒有任何問題。你在'composer.json'中是否有這個設置:''minimum-stability「:」dev「'?似乎它缺少。這個擴展還沒有穩定版本。 – arogachev 2015-02-05 18:24:35

+0

@arogachev是的,你是對的。但現在又出現了一個錯誤。你安裝的braintree_php **版本是什麼?我安裝了最後一個([2.37.0](https://developers.braintreepayments.com/javascript+php/sdk/server/setup))和安裝yii2-braintree,它似乎需要2.30.0。 「沒有找到匹配的軟件包」就是它顯示的內容。 – 2015-02-05 18:35:10

+1

我只安裝了'yii2-braintree','braintree_php'作爲依賴安裝。是的,版本是靜態的 - '2.30.0'。 – arogachev 2015-02-05 18:46:03

回答

3

確保您在composer.json有這樣的設置:

"minimum-stability": "dev" 

好像它丟失。這個擴展還沒有穩定版本。

僅安裝yii2-braintree,braintree_php將作爲與靜態版本的依賴關係安裝 - 2.30.0