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
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 master branch of VIPCS.
I have verified the issue still exists in the develop branch of VIPCS.
The text was updated successfully, but these errors were encountered:
Bug Description
When using code like
get_users( [ 'exclude' => 123 ] )
, you'll get a warning likeThis is wrong because this is not a
WP_Query
call and does not usepost__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
Error Code
Environment
Use
php -v
andcomposer show
to get versions.Additional Context (optional)
Tested Against
master
branch?master
branch of VIPCS.develop
branch of VIPCS.The text was updated successfully, but these errors were encountered: