-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attribute wrapped in a Foundry Proxy is not compatible with Symfony\Component\VarExporter\LazyProxyTrait
#639
Comments
Hi @jdecool I think the problem comes from I'll also fix this in Foundry, we should not try to "proxify" objects that are not orm entities nor odm documents |
Thanks @nikophil |
I confirm it solves the problem 👍🏼 |
Thanks @nikophil |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is extracted from #626
Using Foundry 2 in a project that uses the
odolbeau/phone-number-bundle
, I've an error trying to generate an entity using aPhoneNumber
class even if the PhoneNumber isn't created through a factory.According to this entity:
And this Foundry factory:
I've this error:
Because Foundry proxy defined a
public function __unserialize(array $data): void
function fromSymfony\Component\VarExporter\LazyProxyTrait
while thePhoneNumber
class definespublic function __unserialize($data): void
I've created a small project to reproduce the bug: https://github.com/jdecool/foundry-bug-demo
You just have to:
composer install
bin/console doctrine:fixtures:load -n
to use the Foundry factoryThe text was updated successfully, but these errors were encountered: