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

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

问题描述

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

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更新没有帮助。可能是错误的?

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

推荐答案

首先,使用 bin / vendor更新是一个坏主意,因为它将所有的供应商设置为最新版本。您应该仅使用 bin / vendor安装

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.

其次,确保使用 1.0.x 分支 StofDoctrineExtensionsBundle ,因为 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天全站免登陆