【发布时间】:2016-09-05 20:00:01
【问题描述】:
我正在使用 symfony3 构建一个 web 应用程序,当我尝试安装几个外部包时,我得到了
您的要求无法解决为一组可安装的 包。
我尝试使用选项--ignore-platform-reqs,但同样的事情发生了。
这些捆绑包只适用于 symfony2?我认为 symfony3 是完全向后兼容的?
为了进行安装,composer 是否有更多配置?
PS:PHP 5.5.8
编辑:composer.json
{
"name": "dell/.checkout",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/assetic-bundle": "v2.8.0",
"friendsofsymfony/jsrouting-bundle": "2.0.0-alpha1",
"blackknight467/star-rating-bundle": "v2.0.1",
"nomaya/social-bundle": "dev-master",
"payum/payum-bundle": "2.0.1"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"platform": {
"php": "5.5.9"
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
【问题讨论】:
-
取决于捆绑包是否与新的 sf3 版本对齐。尝试发布您的
composer.json文件 -
@Matteo 但为什么它不起作用?反正它向后兼容吗? (用 composer.json 更新)
-
ignore-platform-reqs仅跳过平台要求(即 php 版本等)检查docs -
所以没有解决办法?
-
您应该修复捆绑包依赖关系。 :(
标签: composer-php symfony