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
609 stars 63 forks source link

refactor: deprecate config auto_refresh_proxies #524

Closed nikophil closed 6 months ago

nikophil commented 7 months ago

ok, this gave me serious headaches! 😅 :exploding_head: but the PR is finally green :green_circle:

we had some small incoherence in the model at different places, which made the test fail if the entities are refreshed from the db

at first, I wanted to deprecate the option auto_refresh_proxies and default to true, but this could lead to :

What I propose is to make this explicit: let's force the user through deprecation to set this option to true, so they won't be surprised that some of their test fail. And let's deprecate the option in 2.0, where we won't use it anymore. WDYT?