Closed 4d4ch4u32 closed 2 months ago
As far as PHPStan is concerned, you can remove all those @method
tags and PHPStan will still see the methods correctly, thanks to generics and your @extends
tag.
As far as PhpStorm is concerned, it should still infer those return types correctly, because PhpStorm understands generics too.
Try removing all those @method
tags and report back. If it doesn't work, you should open two bug reports to PhpStorm's issue tracker:
1) Allow array<mixed>
as @method
parameter type
2) Understand return type of ServiceEntityRepository find*
methods through @extends
.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
After upgrading to
phpstan-doctrine
version1.5.2
it is required to do the following changes:My IDE (phpstorm) is now interpreting the
<mixed>
afterarray
in@method
-tag parameters as an syntax error.Is there another way to fix phpstan errors like
Class App\Repository\TagRepository has PHPDoc tag @method for method findBy() parameter #1 $criteria with no value type specified in iterable type array
?