phpsymfonydoctrine-ormdoctrine-extensions

stof_doctrine_extensions can't load in symfony


I'm trying to do a "soft-delete" for a symfony project. So i want to use StofDoctrineExtensionsBundle and i did :

stof_doctrine_extensions:
    orm:
        default:
            ...
            softdeleteable: true

doctrine:
    ...
    orm:
        filters:
            softdeleteable:
                class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                enabled: true

In my config.yml.

But now i have the error message:

Unrecognized option "softdeleteable" under "doctrine.orm.entity_managers.filters"


Solution

  • in the error message you post seems you put the key filters under entity_managers key (as message says: under "doctrine.orm.entity_managers.filters"). fix moving the filters section under the orm key, as example:

    doctrine:
        orm:
            filters:
                softdeleteable:
                    class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                    enabled: true
    

    Hope this help