flapdoodle-oss / de.flapdoodle.embed.mongo

...will provide a platform neutral way for running mongodb in unittests.
Apache License 2.0
907 stars 161 forks source link

How to migrate from 2.2.0 to latest? #485

Closed cskarapapas closed 10 months ago

cskarapapas commented 11 months ago

I'd like to know what are the essential changes between 2.2.0 and the latest (currently 4.9.2) version, in order to understand what changes need to be made regarding code and dependencies in order to upgrade to the latest version. Is there a guide or documentation you could point me to? Thank you.

michaelmosmann commented 11 months ago

@cskarapapas version >=4 is a complete rework of this library .. there is no easy transition if you wrote a lot of customizations. If you use spring than you should use one of the integrations (https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring) ..

If something does not work, just ask..

The base idea is this: The first version of this library used OO to make it customizable and extendable.. but it also tried to hide pain point like how to stop a process on different platforms.. it became more and more unmaintainable .. with this rewrite i tried to achieve to make it more customizable without the same pain by using a more functional approach ..

For this i created this library: https://github.com/flapdoodle-oss/de.flapdoodle.reverse which provides 3 things.. transitions which are more or less factories with build-in rollback after usage, a declaration of dependencies and a graph which can call these factories in the right order an clean up after usage.

... and a lot of glue code.

michaelmosmann commented 10 months ago

@cskarapapas .. i will close this.. reopen if needed:)