当前位置: 首页 > 知识库问答 >
问题:

Sonata Admin for Symfony 4.4不可能安装细枝/细枝冲突

单于越
2023-03-14

我负责新项目Symfony 4.4

symfony new_项目——版本=4.4

然后呢

作曲家需要索纳塔项目/管理包

并得到错误

composer require sonata-project/admin-bundle
Using version ^3.72 for sonata-project/admin-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sonata-project/admin-bundle 3.72.0 requires sonata-project/block-bundle ^3.20 -> satisfiable by sonata-project/block-bundle[3.20.0].
    - Installation request for sonata-project/admin-bundle ^3.72 -> satisfiable by sonata-project/admin-bundle[3.72.0].
    - Conclusion: remove twig/twig v3.0.4
    - Conclusion: don't install twig/twig v3.0.4
    - sonata-project/block-bundle 3.20.0 requires twig/twig ^2.12.1 -> satisfiable by twig/twig[v2.12.1, v2.12.2, v2.12.3, v2.12.4, v2.12.5, v2.13.0].
    - Can only install one of: twig/twig[v2.12.1, v3.0.4].
    - Can only install one of: twig/twig[v2.12.2, v3.0.4].
    - Can only install one of: twig/twig[v2.12.3, v3.0.4].
    - Can only install one of: twig/twig[v2.12.4, v3.0.4].
    - Can only install one of: twig/twig[v2.12.5, v3.0.4].
    - Can only install one of: twig/twig[v2.13.0, v3.0.4].
    - Installation request for twig/twig (locked at v3.0.4, required as ^2.12|^3.0) -> satisfiable by twig/twig[v3.0.4].

这里生成composer.json

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "composer/package-versions-deprecated": "^1.10",
        "doctrine/annotations": "^1.0",
        "doctrine/doctrine-bundle": "^2.1",
        "doctrine/doctrine-migrations-bundle": "^3.0",
        "doctrine/orm": "^2.7",
        "phpdocumentor/reflection-docblock": "^5.1",
        "sensio/framework-extra-bundle": "^5.1",
        "symfony/asset": "4.4.*",
        "symfony/console": "4.4.*",
        "symfony/dotenv": "4.4.*",
        "symfony/expression-language": "4.4.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "4.4.*",
        "symfony/framework-bundle": "4.4.*",
        "symfony/http-client": "4.4.*",
        "symfony/intl": "4.4.*",
        "symfony/mailer": "4.4.*",
        "symfony/messenger": "4.4.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/process": "4.4.*",
        "symfony/property-access": "4.4.*",
        "symfony/property-info": "4.4.*",
        "symfony/security-bundle": "4.4.*",
        "symfony/serializer": "4.4.*",
        "symfony/translation": "4.4.*",
        "symfony/twig-bundle": "4.4.*",
        "symfony/validator": "4.4.*",
        "symfony/web-link": "4.4.*",
        "symfony/yaml": "4.4.*",
        "twig/extra-bundle": "^2.12|^3.0",
        "twig/twig": "^2.12|^3.0"
    },
    "require-dev": {
        "symfony/browser-kit": "^4.4",
        "symfony/css-selector": "^4.4",
        "symfony/debug-bundle": "^4.4",
        "symfony/maker-bundle": "^1.0",
        "symfony/monolog-bundle": "^3.0",
        "symfony/phpunit-bridge": "^5.1",
        "symfony/stopwatch": "^4.4",
        "symfony/twig-bundle": "^4.4",
        "symfony/var-dumper": "^4.4",
        "symfony/web-profiler-bundle": "^4.4"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.4.*"
        }
    }
}

什么版本兼容?我应该更改哪个供应商来安装sonata管理员?

共有1个答案

李言
2023-03-14

从这条信息中你可以看到:

索纳塔项目/区块捆绑包3.20.0需要细枝/细枝^2.12.1-

因此,您需要在v2中安装twig/twig——目前已安装v3。

此外,尝试使用较新版本的索纳塔项目/block bundle-v4与Twig 3兼容。

 类似资料:
  • 我的应用程序到处都有AJAX请求,我想用CSRF令牌保护它们。但是,我不希望生成CSRF令牌并将其传递给Twig渲染器以便在JavaScript中使用,而是希望Twig渲染的每个html页面中都可以使用CSRF令牌。 我看到Laravel似乎把它放在一个元标签中,所以我可以很容易地用JavaScript抓取它。但是在Symfony中如何做到这一点呢?如何在每一页中插入此令牌? 或者这不是一个好的做

  • 我被用来在表单/字段中重新定义date_小部件。html。Symfony 2和3中的细枝文件,强制细枝生成的日期选择为法语顺序:日-月-年,代码如下: 现在有了symfony4.4,我在我的Linux工作站上自动获得了这个法国订单。但在生产服务器中,订单又是美国标准的:月-日-年。若我用上面的代码示例重新定义这个订单,我会在生产服务器上得到法国订单,但在我的工作站上得到美国订单。 两个系统都有ph

  • 我想用树枝填充过去14个月的数组。 我试过了 但是这会在这一行抛出一个错误

  • 在Craft CMS中使用这个细枝代码,我得到如下所示的错误。Craft CMS的制造商告诉我,小枝“date”不支持像“janvier 2016”这样的本地化月份名称,但英文“janvier 2016”也可以。 这是真的吗? 我的小枝:{%set queryStartDate=date([month,year]| join(“”))%} 错误:DateTime::_construct():无法分

  • 今天面了荔枝,面试体验很不错,遇到了第一个提到我技术博客的面试官 --- 面试内容,基础部分问了java面向对象,其他都是项目。 问了java面向对象的特性,平时怎么用到的,有带来什么好处吗?然后问我有没有遇到用起来不太方便的地方,应该怎么解决? 之后都是在问项目,问做项目过程中碰到过什么难点,以及研究生方向跟开发工作可能不太一样,怎么看这点? --- 最后反问了解了一下公司现在的业务。 面试官很

  • 不得不说荔枝面试体验真的很好,上来面试官先做了自我介绍。 --- 项目中遇到的困难,是如何解决的 提到研究生项目,讲了一下改进的思路和策略 安卓四大组件 activity跳转回传数据怎么实现 简历上提到RecyclerView,问和ListView的区别 简历上的安卓项目,项目有哪些部分,我负责的模块 提到设计模式,问项目中某个功能可以用什么设计模式来实现 线程异步 创建线程的方法 提到线程池,说