laravel-doctrine / extensions

Extensions integration for Doctrine2 and Laravel
http://laraveldoctrine.org/
MIT License
48 stars 24 forks source link

Softdeleteable not Loggable #42

Open Leuloch opened 5 years ago

Leuloch commented 5 years ago

Hi!

When those 2 extensions are combined the softdelete is not triggered in the audit-table of the entity. Not even an update. You would expect at least an update event is triggered because the timestamp of the deleteAt column is changed.

I saw in this tread: https://github.com/stof/StofDoctrineExtensionsBundle/issues/317 that we should change the Extension Priority.

Where can I set this config for Loggable extension?

vv12131415 commented 5 years ago

@Leuloch priority is symfony-only feature it's not available in laravel. I'm not sure, but what you can try is change the order of config('doctrine.extensions') array.

Also you can implement similar feature here, in laravel, in doctrine

any way PRs are welcome

juliocgs commented 5 years ago

Can confirm that this works:

change the order of config('doctrine.extensions') array.

I had to put it into the first position though.