foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Refactor "database reset" mechanism

Open nikophil opened this issue 1 year ago • 2 comments

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

nikophil avatar Aug 25 '24 15:08 nikophil

I have tested this PR and it works great for me. Thank you!

jongotlin avatar Oct 14 '24 13:10 jongotlin

If not in the docs, at least in the PR description, I'd like to see an example of hooking into this in userland.

kbond avatar Oct 19 '24 21:10 kbond