安装"payum/stripe:*@stable"时出错



我正试图通过运行在我的symfony2项目上安装Stripe

$ php composer.phar require "payum/stripe:*@stable"

然而,我收到了以下错误消息:无法将您的要求解析为一组可安装的程序包。

问题1

- Conclusion: don't install payum/stripe 0.14.0
- Conclusion: don't install payum/stripe 0.13.0
- Conclusion: don't install payum/stripe 0.12.0
- Conclusion: don't install payum/stripe 0.11.0
- Installation request for payum/stripe *@stable -> satisfiable by payum/stripe[0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0].
- Conclusion: remove payum/payum 0.9.3
- payum/stripe 0.10.0 requires payum/core 0.10.* -> satisfiable by payum/core[0.10.0, 0.10.x-dev].
- don't install payum/core 0.10.0|don't install payum/payum 0.9.3
- don't install payum/core 0.10.x-dev|don't install payum/payum 0.9.3
- Installation request for payum/payum == 0.9.3.0 -> satisfiable by payum/payum[0.9.3].

安装失败,正在还原/composer.json所容纳之物

我的composer.json文件内容如下:

{
"name": "itjari/xraydata",
"description": "XrayData : A New Start In The battle Against CyberBullying!",
"autoload": {
    "psr-0": {
        "": "src/"
    }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "doctrine/doctrine-fixtures-bundle": "dev-master",
    "twig/extensions": "1.0.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "apache/log4php": "2.3.*@stable",
    "swiftmailer/swiftmailer": "4.3.*@stable",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "friendsofsymfony/jsrouting-bundle": "1.1.*@dev",
    "genemu/form-bundle": "2.2.*@dev",
    "sunra/php-simple-html-dom-parser": "1.5.0.*@dev",
    "facebook/php-sdk-v4": "4.0.*",
    "ob/highcharts-bundle": "dev-master",
    "google/apiclient": "1.0.*@dev",
    "phpoffice/phpexcel": "~1.8.0",
    "liuggio/excelbundle": "2.0.x-dev",
    "jmhobbs/swiftmailer-transport-aws-ses": "dev-master",
    "raulfraile/ladybug-bundle": "dev-master",
    "thobbs/phpcassa": "dev-master",
    "jms/serializer-bundle": "0.13.*@dev",
    "apy/datagrid-bundle": "dev-master",
    "zeptech/annotations": "1.1.0",
    "fzaninotto/faker": "1.5.*@dev",
    "misd/guzzle-bundle": "~1.0",
    "jms/payment-paypal-bundle": "~1",
    "payum/jms-payment-bridge": "0.9.*@dev",
    "omnipay/paypal": "~2.0",
    "omnipay/stripe": "~2.0",
    "friendsofsymfony/rest-bundle": "1.3.*",
    "tijsverkoyen/css-to-inline-styles": "~1.5",
    "mpdf/mpdf": "dev-master",
    "lexik/jwt-authentication-bundle": "dev-master",
    "payum/stripe": "*@stable"
    },
"require-dev": {
    "doctrine/doctrine-migrations-bundle": "dev-master",
    "doctrine/migrations": "dev-master",
    "phpunit/phpunit": "4.1.*@stable",
    "phpunit/dbunit": "1.3.*@stable",
    "behat/behat": "2.4.*@stable",
    "behat/common-contexts": "*",
    "behat/mink-extension": "*",
    "behat/mink-selenium2-driver": "*",
    "behat/mink-sahi-driver": "*",
    "squizlabs/php_codesniffer": "1.*",
    "mockery/mockery": "dev-master",
    "tedivm/fetch": "0.5.*",
    "zeptech/annotations": "1.1.0",
    "fzaninotto/faker": "1.5.*@dev",
"liuggio/fastest": "dev-master",
    "symfony/stopwatch": "2.7.x-dev"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
    ]
},
"config": {
    "bin-dir": "bin",
"discard-changes": true
},
"prefer-stable": true,
"minimum-stability": "dev",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.3-dev"
    }
}
}

使用"payum/stripe":"0.15.*@dev"在您的composer json中。

https://packagist.org/packages/payum/stripe

然后使用命令:

$ php composer.phar require "payum/stripe"

这应该很好,我不熟悉稳定,但这一定是问题所在。

我建议使用这个:

php composer.phar require payum/stripe

除此之外,你应该检查这个页面,它将指导你如何安装最新和稳定的版本:

http://payum.org/doc/0.14/Stripe/checkout

我通过编辑composer.json并添加payum/stripe:*@stable来要求部分,然后运行:来解决这个问题

$ composer update

这听起来很奇怪,但它很有效,在这次更新中让你知道这一点,并要求我删除一些依赖项并获取其他依赖项。

您的require部分中有一个"payum/jms-payment-bridge": "0.9.*@dev",这意味着安装了0.9.x版本的payum/core。然后您尝试需要一个"payum/stripe": "*@stable",它现在是0.14.*。根本不可能同时具有0.9和0.14。

解决方案:像"payum/stripe": "~0.14.0"一样明确设置版本,并仅为这些包运行composer更新

```

php composer.phar更新payum/core-payum/payumbundle-payum/stripe-payum/jms支付桥```

仅供参考:运行php composer.phar update并不安全,因为它会更新整个供应商,可能会因此而损坏一些东西。当你这样做时,你必须运行测试或手动测试整个网站。

相关内容

  • 没有找到相关文章

最新更新