You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, in QueryPlanAnalyzerRule::analyze, the $queryArgPosition is not used, and it assumes that the query string is the first argument, and the parameters are (optionally) the second argument.
Personally, I don't have a need to specify the position of the query string argument, but maybe both could be supported, if desirable? Something like:
the callable format is class::method#parameterIndex, while the parameter-index defines the position of the query-string argument. If the parameter-index is omitted, then phpstan-dba assumes the method takes a query-string as a 1st and the parameter-values as a 2nd argument.
If that makes sense and would be helpful, I'd be happy to submit a PR. Thanks!
The text was updated successfully, but these errors were encountered:
However, in QueryPlanAnalyzerRule::analyze, the $queryArgPosition is not used, and it assumes that the query string is the first argument, and the parameters are (optionally) the second argument.
you are right. the $queryArgPosition is not really used. I think we should simplify the config format (while beeing compatible with the old format for BC reasons) and adjust the docs.
Personally, I don't have a need to specify the position of the query string argument, but maybe both could be supported, if desirable? Something like:
I don't want to implement it right now, if noone needs it yet. we can discuss again when someone comes up with a valid use case for it
The QueryPlanAnalyzerRule documentation says:
This is consistent with the parsing in
QueryPlanAnalyzerRule::processNode
:However, in
QueryPlanAnalyzerRule::analyze
, the$queryArgPosition
is not used, and it assumes that the query string is the first argument, and the parameters are (optionally) the second argument.Personally, I don't have a need to specify the position of the query string argument, but maybe both could be supported, if desirable? Something like:
If that makes sense and would be helpful, I'd be happy to submit a PR. Thanks!
The text was updated successfully, but these errors were encountered: