-
Notifications
You must be signed in to change notification settings - Fork 43
Closed as not planned
Labels
Description
Bug Description
When using code like get_users( [ 'exclude' => 123 ] ), you'll get a warning like
Using `exclude`, which is subsequently used by `post__not_in`, should be done with caution, see https://docs.wpvip.com/how-tos/improve-performance-by-removing-usage-of-post__not_in/ for more information.
This is wrong because this is not a WP_Query call and does not use post__not_in.
Querying that many users is still not super ideal, but I think this warrants its own sniff that is less confusing.
Minimal Code Snippet
get_users( [ 'exclude' => 123 ] )Error Code
Environment
Use php -v and composer show to get versions.
| Question | Answer |
|---|---|
| PHP version | 8.1.12 |
| PHP_CodeSniffer version | 3.7.1 |
| VIPCS version | 2.3.3 |
Additional Context (optional)
Tested Against master branch?
- I have verified the issue still exists in the
masterbranch of VIPCS. - I have verified the issue still exists in the
developbranch of VIPCS.
Reactions are currently unavailable