我试图将Symfony2从2.0更新到2.2(2.2版本是必需的),但composer install命令导致以下错误:
Problem 1
- The requested package symfony/assetic-bundle could not be found in any version, there may be a typo in the package name.
Problem 2
- Installation request for pinroom/pinroom-web 2.2.x-dev -> satisfiable by pinroom/pinroom-web[2.2.x-dev].
- pinroom/pinroom-web 2.2.x-dev requires symfony/assetic-bundle 2.3.*@dev -> no matching package found.
composer.json内容:
{
"name": "pinroom/pinroom-web",
"description": "Pinroom symfony2 web application",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*@dev",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
"sensio/framework-extra-bundle": "2.2.*",
"sensio/generator-bundle": "2.2.*",
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"kriswallsmith/assetic": "1.1.*",
"stof/doctrine-extensions-bundle": "~1.1@dev",
"predis/predis": "0.*",
"snc/redis-bundle": "2.1.*@dev",
"cybernox/amazon-webservices-bundle": ">=1.5.4",
"gregwar/image-bundle": "dev-master",
"oldsound/rabbitmq-bundle": "dev-master",
"friendsofsymfony/elastica-bundle": "~2.0",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/intl-bundle": "dev-master",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/user-bundle": "2.2.*@dev",
"friendsofsymfony/user-bundle": "*",
"friendsofsymfony/facebook-bundle": "1.1.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"scripts": {
"post-install-cmd": [
"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": [
"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"
},
"minimum-stability": "alpha",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.2-dev"
}
}
}
如果我将symfony/assetic捆绑包版本更改为"2.1.*",composer安装可以工作,但安装资产失败并出现此错误。我已经在相关的帖子中尝试过提出的解决方案,但它导致了作曲家的错误。
有人通过了吗?
提前感谢&对不起我的英语。
编辑
这是由于依赖关系错误。最后我完成了2.2-2.3 LTS的升级。
您可能只应该更新到最新版本,即2.4或2.5,通常不建议安装旧版本。这取决于你。我只能包括我在composer.json文件中看到的更改,您可能想尝试这些更改。
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/"}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"twbs/bootstrap": "3.1.*",
"jquery/jquery": "1.10.*",
"braincrafted/bootstrap-bundle": "~2.0",
"knplabs/knp-menu": "2.0.*@dev",
"knplabs/knp-menu-bundle": "2.0.*@dev",
"knplabs/knp-paginator-bundle": "dev-master",
"friendsofsymfony/jsrouting-bundle": "@stable",
"symfony/icu": "1.1.*",
"rhumsaa/array_column": "~1.1",
"webfactory/exceptions-bundle": "@stable"
},
"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",
"Braincrafted\Bundle\BootstrapBundle\Composer\ScriptHandler::install"
],
"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",
"Braincrafted\Bundle\BootstrapBundle\Composer\ScriptHandler::install"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
},
"symfony-assets-install": "symlink"
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.10.2",
"dist": {
"url": "http://code.jquery.com/jquery-1.10.2.js",
"type": "file"
}
}
}
]
}
如果你注意到一些事情,你可能想检查并尝试以下操作:
1) 名字:,我不知道这是干什么用的,但它可能造成了"弹夹室"的问题。
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
2) 符号版本"symfony/symfony": "~2.4",1
3) 您指示的资产捆绑包"symfony/assetic-bundle": "~2.3",
的版本
4) 指定的最小稳定性"minimum-stability": "stable",