Re:Self-obfuscating value objects in PHP
by biryani_chicken on Sunday February 27, 2022 @12:09AM
(#30485607)
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.
[ Parent
| on HN ]
Re:Self-obfuscating value objects in PHP
by Master_Odin on Sunday February 27, 2022 @08:19AM
(#30488139)
You can use phpcs <https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src...> to easily do this.
Re:Self-obfuscating value objects in PHP
by mschuster91 on Sunday February 27, 2022 @07:19AM
(#30487682)
> 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-rede...