-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag 'exclude' args in get_posts() #369
Comments
I'm looking at this sniff now and am wondering if there was a particular reason why this sniff wasn't based on the I'd happy to switch it over. The only downside of that would be that the error codes would change as the abstract doesn't allow for custom error codes, which would be a BC-break. The error code change would be along the lines of:
Alternatively, I could implement the use of the abstract anyway, but only for the new array key detection. For the existing two checks, the switch-over could be targetted for the VIPCS 3.0.0 release. |
Also note that At the same time, hard linking the key detection to |
@jrfnl I don't think that was a consideration at the time: 5d86203#diff-8568a7057376eaec476ec111d5469c9d
Agreed, but I do still think it's something worth flagging. |
Well, the abstract sniff was already available at the time, so that doesn't really answer my first question. Either way - what about my suggestion for switching it over ? Either completely or partially to prevent the BC-break and finishing the switch over off in 3.0 ? |
@rebeccahum @GaryJones Any opinions on my suggestion ? |
@jrfnl Yes, this sounds great, I will work on getting it switched out! |
@rebeccahum I actually got the changes for this mostly ready already. I just need a decision on how we want to handle the error code BC-break before I can finish it off and pull it. So do we mind a BC-break for those two error code in a minor or not ? |
@jrfnl Oh awesome! I personally think the BC-break for those two error codes are minor enough to warrant the change. @GaryJones thoughts? |
We've been caught out recently with a BC break of error codes going into a minor, so I'd much prefer having it partially addressed now, and doing the BC-break in the major please. |
What problem would the enhancement address for VIP?
Since
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn
checks forpost__not_in
, we should also check for the'exclude'
parameter being passed intoget_posts()
which in turn callspost__not_in
.Describe the solution you'd like
What code should be reported as a violation?
What could should not be reported as a violation?
Additional context
Codex: https://developer.wordpress.org/reference/functions/get_posts/
The text was updated successfully, but these errors were encountered: