Doctrine Debug dump usage instead of var_dump

0 Flares Twitter 0 Facebook 0 LinkedIn 0 0 Flares ×
Lazy load proxies always contain an instance of Doctrine’s EntityManager and all its dependencies. Therefore a var_dump() will possibly dump a very large recursive structure which is impossible to render and read.
You have to use Doctrine\Common\Util\Debug::dump() to restrict the dumping to a human readable level.
Additionally you should be aware that dumping the EntityManager to a Browser may take several minutes, and the Debug::dump() method just ignores any occurrences of it in Proxy instances.

See tutorial:


Web Deviloper