Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't enable SoftDeleteable in Symfony2 - Unrecognized options "filters"

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?

like image 586
Kaivosukeltaja Avatar asked Nov 04 '22 01:11

Kaivosukeltaja


1 Answers

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.

like image 193
Elnur Abdurrakhimov Avatar answered Nov 13 '22 02:11

Elnur Abdurrakhimov