yii2-Braintree installation problem via Composer

Asked

Viewed 82 times

1

I have successfully installed the Braintree component by Composer. Now, I need to install another component, the yii2-Braintree.

I added, as the tutorial says, the line "bryglen/yii2-braintree": "*" to the section require 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": "*"
},

Then I executed the command 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.

I’m doing something wrong or the problem is with the repository?

1 answer

1


The problem is due to minimum-Stability Composer.json is probably set to @stable, and since the version of the package you are trying to clone has not been specified, Composer will try to clone the latest version that is probably not compatible with minimum-Stability.

To solve this problem try to specify the version

"require": {
    "braintree/braintree_php": "2.37.0",
    "bryglen/yii2-braintree": "@dev"
},

minimum-Stability Composer doc

Browser other questions tagged

You are not signed in. Login or sign up in order to post.