kint-php / kint

Kint - Advanced PHP dumper
https://kint-php.github.io/kint/
MIT License
2.78k stars 292 forks source link

How to not dump objects i don't want ? #239

Closed steevanb closed 7 years ago

steevanb commented 7 years ago

Hi !

This is not really an issue, but i don't know where i can ask it :(

I don't want to dump Doctrine proxies, cause they have too much linked objets, and each time, kint goes out of memory.

How i can do this ? I've read plugins documentation ( https://kint-php.github.io/kint/plugins/ ), i've found how to remove Representation, but that's not enough : i need to tell kint to not dump it.

jnvsor commented 7 years ago

You don't need to write a plugin - Kint comes with a plugin to do exactly that. See the "Useful plugins" section in the docs.

tl;dr: Kint_Parser_Blacklist::$shallow_blacklist[] = 'Doctrine\\Common\\Persistence\\Proxy';