Closed AdriwanKenoby closed 6 years ago
I realize this code depend on the ORM Doctrine and you want this bundle to be ORM agnostic
Yep indeed, but since it's a Symfony bundle and since Symfony is shipped with Doctrine by default, I think we should detect Doctrine's Proxy pattern and find the original class (independantly of Doctrine's entity manager, because the doctrine service may not exist in the container). I've already done that in the past, I'll try to improve this.
Anyway, you should not face this problem unless you rely on a Doctrine association. Can I have a sample of your code where you encounter it?
I've done a small fix. Can you try it with dev-master?
The method return nothing because the variable passed could be instance of Proxies__CG__\ object.