zenstruck / foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.
https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html
MIT License
607 stars 62 forks source link

[2.x] Automatically test all "cascade" combinations in tests #597

Open nikophil opened 1 month ago

nikophil commented 1 month ago

I think we could get rid of CascadeEntity... classes in tests by using Doctrine's event loadClassMetadata

Somehow, we could automatically hook with this even and generate all "cascade" combinations and run tests against it.

I'm not sure if this is possible, but I think it could lower the complexity of the tests. Let's experiment :microscope: :scientist: