5

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

But this is what I get:

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

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

Kaivosukeltaja
  • 15,541
  • 4
  • 40
  • 70

2 Answers2

3

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.

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.

Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
  • 1
    Thanks, `master` does seem to contain a bc break so we switched to `1.0.x`. Unfortunately it lacks support for doctrine filters so it looks like we'll have to do without SoftDeleteable for now. – Kaivosukeltaja Apr 30 '12 at 18:44
-1

You can just do it yourself, it is not hard, saving you from installing another bundle:

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/filters.html

David Lin
  • 13,168
  • 5
  • 46
  • 46