我正在尝试通过运行
在我的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"
}
}
}
答案 0 :(得分:0)
使用 “payum / stripe”:“0.15.*@dev” 在你的作曲家json。
https://packagist.org/packages/payum/stripe
然后使用命令:
$ php composer.phar require "payum/stripe"
应该没问题我不熟悉@stable,但一定是问题。
答案 1 :(得分:0)
我建议用这个:
php composer.phar require payum/stripe
除了你应该检查这个页面,它将指导你如何安装最新和稳定的版本:
答案 2 :(得分:0)
我设法通过编辑composer.json并添加payum / stripe来解决它:* @ stable to require part然后运行:
$ composer update
对我来说听起来很奇怪,但它确实有效,让您知道在此更新过程中,我要求删除一些依赖项并获取其他依赖项。
答案 3 :(得分:0)
您的“需求”部分中有"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"
,并仅为这些包
```
php composer.phar更新payum / core payum / payum-bundle payum / stripe payum / jms-payment-bridge ```
仅供参考:运行php composer.phar update
并不安全,因为它会更新整个供应商,因此可能会因此而中断。当您这样做时,您必须手动运行测试或测试整个站点。