WordPress-VIP-Go: Replace WordPress.WP.GlobalVariablesOverride.OverrideProhibited with WordPress.WP.GlobalVariablesOverride.Prohibited#610
Conversation
…deProhibited with WordPress.WP.GlobalVariablesOverride.Prohibited
|
Since it's been so long since this change happened, and we didn't notice, do we need an addition to a ruleset test to cover this as well? |
|
It does look like we already do in the parent ruleset: VIP-Coding-Standards/WordPressVIPMinimum/ruleset-test.inc Lines 72 to 74 in 6d3f526 I'm not sure what difference it would make for violation name changes that occur if it still triggers an expected error regardless...would it be a different type of test with an ignore statement? |
|
Reviewed after the fact. To be quite fair, I'd recommend for this severity change to be removed completely. In reality it hasn't been active since the update to WPCS 2.0.0+ in April 2019 in commit 53505ff and AFAICS nobody has complained about it. The reason why you probably haven't received many complaints is that the sniff has had quite a lot of improvements over the years which reduced false positives. The only false positives which are common with this sniff is when using "views" which are themselves in stand-alone files (global namespace), but are in reality only used via an More than anything, the sniff currently has a lot of false negatives as there are a lot of global variables in WP which the sniff is not yet looking for. |
Fixes #609.