Refactor "database reset" mechanism
This is an experiment to refactor "database reset" mechanism.
The goal is to decouple the code and to allow end users to extend it, thanks to decoration - I'll add an example in the docs on how to hook in the database reset mechanism
This work was inspired by this comment, I think I also do prefer decoration over an event system in Foundry
fixes https://github.com/zenstruck/foundry/issues/540 https://github.com/zenstruck/foundry/issues/658
~(let's merge https://github.com/zenstruck/foundry/pull/686 before this one, I'll take care of the rebase)~ done
I have tested this PR and it works great for me. Thank you!
If not in the docs, at least in the PR description, I'd like to see an example of hooking into this in userland.