gpt4 book ai didi

php - 无法在 Symfony2 2.4 中安装 SonataUserBundle

转载 作者:行者123 更新时间:2023-12-02 06:35:23 24 4
gpt4 key购买 nike

我无法使用 symfony2 2.4 安装 sonata-project/user-bundle。 Composer 给我这样的错误信息:

  Problem 1
- Conclusion: remove symfony/symfony v2.4.0
- Installation request for symfony/framework-standard-edition 2.4.x-dev -> satisfiable by symfony/framework-standard-edition[2.4.x-dev].
- Conclusion: don't install symfony/symfony v2.4.0
- Installation request for sonata-project/user-bundle 2.2.2 -> satisfiable by sonata-project/user-bundle[2.2.2].
- Installation request for friendsofsymfony/user-bundle ~2.0@dev -> satisfiable by friendsofsymfony/user-bundle[2.0.x-dev].
- symfony/framework-standard-edition 2.4.x-dev requires sensio/framework-extra-bundle ~3.0 -> satisfiable by sensio/framework-extra-bundle[v3.0.0].
- sensio/framework-extra-bundle v3.0.0 requires symfony/framework-bundle ~2.4 -> satisfiable by symfony/symfony[v2.4.0], symfony/framework-bundle[v2.4.0].
- sensio/framework-extra-bundle v3.0.0 requires symfony/framework-bundle ~2.4 -> satisfiable by symfony/symfony[v2.4.0], symfony/framework-bundle[v2.4.0].
- Conclusion: don't install symfony/framework-bundle v2.4.0

我的 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.*",
"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",
"friendsofsymfony/user-bundle": "~2.0@dev",
"stof/doctrine-extensions-bundle": "~1.1@dev",
"sonata-project/admin-bundle": "~2.1",
"sonata-project/doctrine-orm-admin-bundle": "~2.1",
"sonata-project/user-bundle": "2.2.2",
"knplabs/knp-paginator-bundle": "2.3.*",
"knplabs/knp-menu-bundle": "1.1.*",
"knplabs/knp-menu": "1.1.*"

},
"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"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}

当我从 composer.json 中删除行 "sonata-project/user-bundle": "2.2.2", - composer 更新运行顺利。

sonata-user [2.2.2] 与 Symfony2 2.4 不兼容吗?我找不到任何官方信息。

我检查了 composer.json od SonataUserBundle 和 SonataAdminBundle(我安装成功),两者都需要“symfony/http-foundation”:“~2.2”,所以我真的没有想法......

更新

github 中的票证

https://github.com/sonata-project/SonataUserBundle/issues/300#issuecomment-31214179

最佳答案

通过修改 composer.json 更改 friendsofsymfony/user-bundle 的版本 -

"friendsofsymfony/user-bundle": "1.3.3",

并发出命令:

composer update

在 Symfony 2.4.0 上为我工作

关于php - 无法在 Symfony2 2.4 中安装 SonataUserBundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20680148/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com