Last Updated: February 25, 2016
·
2.969K
· damienalexandre

Dumping a Doctrine2 object without killing cats

You know how hard and painful it can be to var_dump a Doctrine2 entity: you are basically dumping the whole entity manager and Symfony2 application...

But there is a solution for that!

\Doctrine\Common\Util\Debug::dump($object);

This method remove the proxies and restrict the dumping to a human readable level \o/