Doctrine 2 proxy classes breaking Symfony2 ACL Doctrine 2 proxy classes breaking Symfony2 ACL symfony symfony

Doctrine 2 proxy classes breaking Symfony2 ACL


I'm am just answering this because i had a hard time to find a solution and this was the first result in google for me.

Yes, it's wrong and it's a known bug for symfony2.

Jonathan Ingram solved this, and wrote a post about it a while ago:http://jonathaningram.com.au/2012/01/13/overriding-the-objectidentityretrievalstrategy-to-check-if-a-domain-object-is-a-doctrine-proxy/

He created his own object identity retrieval strategy to override the default, and registered it in the services.xml (see the post above). Actually it's a pretty simple and straightforward solution, i am a bit ashamed i didn't figured it out on my own :)

In symfony2.1 it's not a problem any more, see: https://github.com/symfony/symfony/pull/3826