【问题标题】:SymfonyCMF RoutingBundle Doctrine PHPCR configuration errorSymfonyCMF RoutingBundle Doctrine PHPCR 配置错误
【发布时间】:2014-04-04 03:34:37
【问题描述】:

我正在关注Creating a Basic CMS 教程,但是在配置 CMF RoutingBundle 之后,就像在Enable the Dynamic Router 中显示的那样,当我尝试加载夹具数据时出现以下错误

PHP Catchable fatal error:  Argument 2 passed to Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer::__construct() must be of the type array, none given

这是我的 config.yml

cmf_routing:
    chain:
        routers_by_id:
            cmf_routing.dynamic_router: 20
            router.default: 100
    dynamic:
        enabled: true
        persistence:
            phpcr:                
                route_basepath: /cms/routes   

【问题讨论】:

    标签: symfony-cmf doctrine-phpcr


    【解决方案1】:

    您似乎遇到了版本混淆。您需要 phpcr-odm 和 phpcr-bundle 的 1.1.* 系列以及 routing-bundle 1.2.* 或 phpcr 在 1.0.* 和路由在 1.1.*

    您是否做过任何作曲家技巧或依赖项是否允许这种不兼容的组合?

    【讨论】:

    • 感谢大卫的回答,是的,我认为依赖关系允许这种情况发生,这里是我的composer.json
    • "doctrine/phpcr-odm": "dev-master as 1.0.0" 和下面的几行是你最终的结果。您告诉作曲家假装 phpcr-odm(即 1.1)的当前 master 为 1.0.0,因此尽管存在冲突,但它不会抱怨冲突。对于作曲家中的“as”事物,您需要真正确定自己在做什么。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    • 2017-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多