0

我正在尝试通过运行在我的 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"
    }
}
}
4

4 回答 4

0

我建议使用这个:

php composer.phar require payum/stripe

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

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

于 2015-03-19T08:15:22.890 回答
0

我设法通过编辑 composer.json 并将 payum/stripe:*@stable 添加到需要部分然后运行来解决它:

$ composer update

对我来说听起来很奇怪,但它有效,让您知道在此更新期间并要求我删除一些依赖项并获取其他依赖项。

于 2015-03-19T12:12:36.397 回答
0

在作曲家 json 中使用 "payum/stripe": "0.15.*@dev"。

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

然后使用命令:

$ php composer.phar require "payum/stripe"

我不熟悉@stable 应该没问题,但这一定是问题所在。

于 2015-03-19T06:02:43.547 回答
0

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

解决方案:明确设置版本"payum/stripe": "~0.14.0"并仅为这些包运行 composer update

```

php composer.phar 更新 payum/core payum/payum-bundle payum/stripe payum/jms-payment-bridge ```

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

于 2015-03-20T07:38:29.110 回答