Skip to content

Loading…

DDC-1732: Unserialized non-initialized proxy classes should throw an exception when a method is called #2381

Open
doctrinebot opened this Issue · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user benjamin:

When we serialize entities in a session, we often have pointers to uninitialized proxies.
These proxies have $_entityPersister == null.

The problem is that if you happen to call by mistake a method on such a proxy, you're not aware that this is an uninitialized proxy, and the business methods are called, with null values for every property.

I think the proxy should throw an exception in that case.
Attached, a patch with the proposed modification.

@beberlei beberlei was assigned by doctrinebot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.