phpstan-doctrine
phpstan-doctrine copied to clipboard
[Feature Request] Require indexed fields in findBy() and similar methods
Forgetting to add an index is very common, and when that happens, we usually don't notice that until the app is already long in production.
I propose creating a PHPstan rule that ensures the existence of an index in these areas:
- criteria & orderBy parameters of findBy & similar methods
- where, orderBy, groupBy in QueryBuilder
- where and orderBy in Criteria