phpstan-src
phpstan-src copied to clipboard
phpstorm.meta.php support for dynamic return types
This PR starts to add support for PHPStorm’s metadata files. It only supports a few basic directives for resolving method/function return types, but of course support for other directives can be added.
I do not think this is ready for a merge yet, I would like some feedback before I dig deeper into it. For example:
- which other meta directives need to be supported (
registerArgumentsSet)? - what tests are needed?
- PHPStorm scans the entire project looking for these meta files, including vendor directories. Should PHPStan also look for vendored meta files by default? I’m a bit concerned about parsing time for large projects.