5 ms·
Sounds like it would be a good idea to get the CI process to check for usage of debugging functions. I'm sure it would be possible to write a phpstan rule to fo
by biryani_chicken 5y ago
Sounds like it would be a good idea to get the CI process to check for usage of debugging functions. I'm sure it would be possible to write a phpstan rule to forbid var_dump. Maybe another solution would be to make them noops on production.
- mschuster91 5y ago> Maybe another solution would be to make them noops on production. There is a way, but it's dangerous: https://www.php.net/manual/en/function.runkit7-function-redefine.php https://www.php.net/manual/en/function.runkit7-function-rede...
- Master_Odin 5y agoYou can use phpcs <https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src...> to easily do this.