psalm-plugin-symfony
psalm-plugin-symfony copied to clipboard
Report dd() and dump() methods
Would it make sense to emit an error when seeing a dd() or dump()?
I do this myself using a PHPStan extension, but just wanted to pitch the idea here because I think it makes sense
@loevgaard thank you for the idea.
In my projects, I use it configuring psalm.xml
<?xml version="1.0"?>
<psalm>
<forbiddenFunctions>
<function name="dd"/>
<function name="dump"/>
</forbiddenFunctions>
</psalm>
The plugin may do this automatically or we can add reminder documentation about forbiddenFunctions feature of Psalm
Oh, that's an easy fix also. Didn't even know that. I am just beginning Psalm :)
I think it would make sense that the plugin did this automatically. Given the insight I have into Psalm plugins (zero) I guess I would need some help to create a PR. Maybe you know of other plugins adding 'forbidden functions'?