无法在 Symfony2 中启用 SoftDeleteable - 无法识别的选项“过滤器" [英] Can't enable SoftDeleteable in Symfony2 - Unrecognized options "filters"

查看:49
本文介绍了无法在 Symfony2 中启用 SoftDeleteable - 无法识别的选项“过滤器"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试激活 StofDoctrineExtensionsBundle 中的 SoftDeleteable 过滤器时遇到问题.我按照手册中的描述对其进行了配置:>

I'm having problems trying to activate the SoftDeleteable filter in StofDoctrineExtensionsBundle. I configured it as described in the manual:

# app/config/config.yml
doctrine:
    orm:
        entity_managers:
            default:
                filters:
                    softdeleteable:
                        class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                        enabled: true

但这就是我得到的:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "filters" under "doctrine.orm.entity_managers.default"

运行 bin/vendors update 没有帮助.可能有什么问题?

Running bin/vendors update didn't help. What could be wrong?

推荐答案

首先,使用 bin/vendors update 是一个坏主意,因为它会将所有供应商设置为他们的最新版本.您应该只使用 bin/vendors install.

First, using bin/vendors update is a bad idea because it sets all the vendors to their latest versions. You should use bin/vendors install only.

其次,请确保您使用的是StofDoctrineExtensionsBundle1.0.x 分支,因为master 分支与Symfony 2.0.x.

Second, make sure you are using the 1.0.x branch of StofDoctrineExtensionsBundle, because the master branch is not compatible with Symfony 2.0.x.

这篇关于无法在 Symfony2 中启用 SoftDeleteable - 无法识别的选项“过滤器"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆