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

Add a static analysis tool like PHPStan #51

Open
acelaya opened this issue Jan 25, 2024 · 1 comment
Open

Add a static analysis tool like PHPStan #51

acelaya opened this issue Jan 25, 2024 · 1 comment

Comments

@acelaya
Copy link
Contributor

acelaya commented Jan 25, 2024

Introducing a static analysis tool would allow to have a layer similar to TypeScript's type checking.

PHPStan is a good option, but we would need to make sure it does not detect WordPress core functions as undefined.

@SteelWagstaff
Copy link

You might also want to look at Psalm? https://psalm.dev/. There's a WordPress plugin available (originally written by Joe Hoyle from Human Made, now maintained by the core Psalm team) that helps with making sure the tool doesn't freak out about not finding WP core functions as well: https://github.com/psalm/psalm-plugin-wordpress

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