How to disable dump symfony function on production

后端 未结 5 979
青春惊慌失措
青春惊慌失措 2021-01-02 20:03

How to disable dump() function, when its in production environment? If i forget the dump function anywhere It crashes with an 500 error

5条回答
  •  天涯浪人
    2021-01-02 20:42

    It would be nice if the dump showed up in a log or as HTML comments so that it would be useful for those situations, where something in your production environment is not working quite right but you need to keep the production environment working as normal. Granted you can't output the pretty HTML you normally see in dump. I have used this technique before and it can be very useful for debugging production issues or some basic performance checks.

提交回复
热议问题