Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report dd() and dump() methods #156

Open
loevgaard opened this issue Mar 12, 2021 · 2 comments
Open

Report dd() and dump() methods #156

loevgaard opened this issue Mar 12, 2021 · 2 comments

Comments

@loevgaard
Copy link

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

@seferov
Copy link
Member

seferov commented Mar 12, 2021

@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

@loevgaard
Copy link
Author

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'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants