How to disable dump() function,
when its in production environment?
If i forget the dump function anywhere It crashes with an 500 error
NEW ANSWER AS OF 3.3:
Now in Symfony 3.3+, you can dump to prod environment. Rather than turning up in the debug toolbar, it shows up in the content area of your page (so if you do this in the controller, it will be at the top).
This can be handy to debug things that don't do the same between dev and prod, and then you can leave your debug code in as you develop, but just make sure before you deploy to a production environment that you comment out any dumps.