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
This is a two-part issue since I think step #2 will need to be done in 3.x due to it being a breaking change (can you please confirm @jrfnl?)
Step 1
Mentioned in #615, we should change the message in the WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog error code to reflect the one being changed in WordPress-VIP-Go since the current one is outdated.
'message' => '%s() is not something you should ever need to do in a VIP theme context. Instead use an API (XML-RPC, REST) to interact with other sites if needed.',
<message>Switch to blog may not work as expected since it only changes the database context for the blog and does not load the plugins or theme of that site. This means that filters or hooks that the blog you are switching to uses will not run.</message>
Step 2
Downgrade to warning type at sniff level and remove modification in WordPress-VIP-Go ruleset:
@rebeccahum Neither of these changes is a breaking change as custom rulesets and ignore annotations don't filter on error/warning, just on sniff name or error code.
In other words, if you'd like to adjust PR #649, that should be fine to go into 2.3.0 still.
@GaryJones Good point and I agree that's very true from a functional point of view.
In this particular case, however, we're talking bumping down to a warning.
On top of that, the bumping down would only affect people who selectively include sniffs or use the WordPressVIPMinimum ruleset. The WordPress-VIP-Go ruleset users are not affected as the rule in question was already a warning for them.
This is a two-part issue since I think step #2 will need to be done in 3.x due to it being a breaking change (can you please confirm @jrfnl?)
Step 1
Mentioned in #615, we should change the message in the
WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog
error code to reflect the one being changed in WordPress-VIP-Go since the current one is outdated.From:
VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
Line 103 in 6d3f526
To:
VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Line 249 in 1fa0266
Step 2
Downgrade to warning type at sniff level and remove modification in
WordPress-VIP-Go
ruleset:VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Line 247 in 1fa0266
The text was updated successfully, but these errors were encountered: