Hacker News new | ask | show | jobs
by thayne 27 days ago
Is there a way to run type checking ahead of time similat to typescript or python's mypy or pyright?
1 comments

PHPStan is one of the more popular tools to evaluate that stuff. It works by examining each file and resolving all of the imports to verify that all of the types are compatible.

Jetbrains PHPStorm has this sort of type resolution built in (one of their value adds) but you can also run PHPStan instead of their proprietary version.