How to disable dump symfony function on production

后端 未结 5 990
青春惊慌失措
青春惊慌失措 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 21:03

    You should remove the dump()s from your production code, it doesn't have to be there.

    But, as noted by Cerad, since it can be annoying when you forget to remove them before checking in, you can define an empty dump() function at the begining of web/app.php:

    src\web\app.php

提交回复
热议问题