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

fix: handle contravariance problem when proxifying class with unserialize method #644

Closed nikophil closed 1 week ago

nikophil commented 1 week ago

I'm monkey patching this in Foundry, since it is a blocker for several users.

fixes https://github.com/zenstruck/foundry/issues/639

see https://github.com/symfony/symfony/pull/57460 We'll remove this code when the PR in Symfony will be released (it targets 6.4, so it will be enough to remove completely this code)