• <tfoot id='ZFcEe'></tfoot>

      <legend id='ZFcEe'><style id='ZFcEe'><dir id='ZFcEe'><q id='ZFcEe'></q></dir></style></legend>
      • <bdo id='ZFcEe'></bdo><ul id='ZFcEe'></ul>

        <small id='ZFcEe'></small><noframes id='ZFcEe'>

        <i id='ZFcEe'><tr id='ZFcEe'><dt id='ZFcEe'><q id='ZFcEe'><span id='ZFcEe'><b id='ZFcEe'><form id='ZFcEe'><ins id='ZFcEe'></ins><ul id='ZFcEe'></ul><sub id='ZFcEe'></sub></form><legend id='ZFcEe'></legend><bdo id='ZFcEe'><pre id='ZFcEe'><center id='ZFcEe'></center></pre></bdo></b><th id='ZFcEe'></th></span></q></dt></tr></i><div id='ZFcEe'><tfoot id='ZFcEe'></tfoot><dl id='ZFcEe'><fieldset id='ZFcEe'></fieldset></dl></div>

      1. Symfony2 DoctrineFixturesBundle 命名空间错误

        时间:2024-08-15

              <tbody id='XSazl'></tbody>

            • <bdo id='XSazl'></bdo><ul id='XSazl'></ul>
            • <i id='XSazl'><tr id='XSazl'><dt id='XSazl'><q id='XSazl'><span id='XSazl'><b id='XSazl'><form id='XSazl'><ins id='XSazl'></ins><ul id='XSazl'></ul><sub id='XSazl'></sub></form><legend id='XSazl'></legend><bdo id='XSazl'><pre id='XSazl'><center id='XSazl'></center></pre></bdo></b><th id='XSazl'></th></span></q></dt></tr></i><div id='XSazl'><tfoot id='XSazl'></tfoot><dl id='XSazl'><fieldset id='XSazl'></fieldset></dl></div>

                <tfoot id='XSazl'></tfoot>
              • <legend id='XSazl'><style id='XSazl'><dir id='XSazl'><q id='XSazl'></q></dir></style></legend>

                <small id='XSazl'></small><noframes id='XSazl'>

                1. 本文介绍了Symfony2 DoctrineFixturesBundle 命名空间错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我无法解决固定装置包的一个大问题.一世按照应遵循的步骤进行操作,将行添加到deps 文件,安装它们,在自动加载中注册它们和应用内核.

                  I have a big problem with the fixtures bundle which I can't resolve. I follow the steps as they are meant to be followed, adding the lines to the deps file, installing them, registering them in the autoload and appkernel.

                  当我尝试只运行 app/console 时,它会中断:

                  When I try to run even only app/console, it breaks with:

                  致命错误:类 'DoctrineBundleDoctrineBundleCommandDoctrineCommand'在/var/www/.../bundles/Doctrine/Bundle/FixturesBundle/中找不到第 40 行的 Command/LoadDataFixturesDoctrineCommand.php

                  这似乎是正确的,因为我没有 DoctrineBundle 目录在 DoctrineBundle 下,只有 DoctrineFixturesBundle.如果我将该行更改为 SymfonyBundleDoctrineBundle... 它可以工作完美,因为该类实际上位于该名称空间下.

                  Which seems right because I don't have a DoctrineBundle directory under DoctrineBundle, only the DoctrineFixturesBundle. If I change that line to SymfonyBundleDoctrineBundle... it works perfectly, because that class resides under that namespace actually.

                  我当然不能这样.我搜索了文档、问题、所有内容,但似乎没有人有同样的问题,所以我一定遗漏了一些明显的点这里.

                  Of course I can't leave it that way. I searched through the documentation, issues, everything, but it seems that noone has this same issue, so I must be missing some obvious point here.

                  有什么想法吗?

                  谢谢

                  推荐答案

                  不久前,所有 Doctrine 包移到了 Doctrine 组织.根据您使用的存储库和分支,这会导致一些混淆.

                  Not long ago, all Doctrine bundles moved to the Doctrine organizaton. This causes some confusion based on which repository and branch you are using.

                  如果您使用的是 Symfony 2.0.x,那么您的 deps 应该如下所示:

                  If you're using Symfony 2.0.x, then your deps should look something like this:

                  [DoctrineFixturesBundle]
                      git=http://github.com/doctrine/DoctrineFixturesBundle.git
                      target=bundles/Symfony/Bundle/DoctrineFixturesBundle
                      version=origin/2.0
                  

                  注意目标/命名空间实际上是 SymfonyBundleDoctrineFixturesBundle.

                  Notice the target/namespace is actually SymfonyBundleDoctrineFixturesBundle.

                  然而,使用最新的 DoctrineFixturesBundle 和 Symfony 2.0.x 应该不会有任何问题——只要你也升级其余的 Doctrine 依赖项.您可以在 deps 中使用它:

                  However, you shouldn't have any problems using the latest DoctrineFixturesBundle with Symfony 2.0.x - as long as you upgrade the rest of the Doctrine dependencies also. You can use this in your deps instead:

                  [doctrine-common]
                      git=http://github.com/doctrine/common.git
                      version=2.2.0
                  
                  [doctrine-dbal]
                      git=http://github.com/doctrine/dbal.git
                      version=2.2.1
                  
                  [doctrine]
                      git=http://github.com/doctrine/doctrine2.git
                      version=2.2.0
                  
                  [doctrine-fixtures]
                      git=http://github.com/doctrine/data-fixtures.git
                  
                  [DoctrineFixturesBundle]
                      git=http://github.com/doctrine/DoctrineFixturesBundle.git
                      target=bundles/Doctrine/Bundle/FixturesBundle
                  

                  这篇关于Symfony2 DoctrineFixturesBundle 命名空间错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Doctrine_RawSql 查询中的聚合值 下一篇:运行 Doctrine 转换映射时跳过表

                  相关文章

                  <i id='V0uI2'><tr id='V0uI2'><dt id='V0uI2'><q id='V0uI2'><span id='V0uI2'><b id='V0uI2'><form id='V0uI2'><ins id='V0uI2'></ins><ul id='V0uI2'></ul><sub id='V0uI2'></sub></form><legend id='V0uI2'></legend><bdo id='V0uI2'><pre id='V0uI2'><center id='V0uI2'></center></pre></bdo></b><th id='V0uI2'></th></span></q></dt></tr></i><div id='V0uI2'><tfoot id='V0uI2'></tfoot><dl id='V0uI2'><fieldset id='V0uI2'></fieldset></dl></div>

                    <tfoot id='V0uI2'></tfoot>
                        <bdo id='V0uI2'></bdo><ul id='V0uI2'></ul>
                      <legend id='V0uI2'><style id='V0uI2'><dir id='V0uI2'><q id='V0uI2'></q></dir></style></legend>

                    1. <small id='V0uI2'></small><noframes id='V0uI2'>