Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relational entity too big to debug [duplicate]

I have around 40 entities and many bidirectional relationships. Whenever i use var_dump($user) or any entity my browser gets loaded with too much data of arrays and variables then it just crashed.

i want to whats the problem.

The data is being inserted fine. Can i cause issue in production.

like image 677
Mirage Avatar asked Sep 13 '26 18:09

Mirage


1 Answers

Replace var_dump() with the debug method dump() provided by Doctrine Common.

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

It works for single objects and Doctrine collections and should prevent browser displaying issues you are having.

like image 155
mgiagnoni Avatar answered Sep 16 '26 09:09

mgiagnoni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!