Move WPCS Deprecated VIP Sniffs to VIPCS.#323
Merged
GaryJones merged 2 commits intoAutomattic:masterfrom Jan 3, 2019
rebeccahum:rebecca/move_wpcsvip_sniffs_to_vipcs
Merged
Move WPCS Deprecated VIP Sniffs to VIPCS.#323GaryJones merged 2 commits intoAutomattic:masterfrom rebeccahum:rebecca/move_wpcsvip_sniffs_to_vipcs
GaryJones merged 2 commits intoAutomattic:masterfrom
rebeccahum:rebecca/move_wpcsvip_sniffs_to_vipcs
Conversation
GaryJones
requested changes
Dec 28, 2018
GaryJones
previously approved these changes
Jan 3, 2019
Rather than the `WordPressVIPMinimum` and `WordPress-VIP-Go` rulesets relying directly on sniffs in `WordPress.VIP` category, the sniffs have been copied over and adapted for VIPCS. Why? WPCS had marked the `WordPress.VIP` sniffs as deprecated in WPCS 1.0, and removed them in WPCS 2.0. VIPCS still has some dependency on WPCS, via classes extended from WPCS abstract sniff classes, and through the referencing of other `WordPress` sniffs in the VIPCS rulesets. Fixes #187.
GaryJones
reviewed
Jan 3, 2019
`SuperGlobalInputUsageSniff` was not carried over from `WordPress.VIP`, so this section removed. `FlushRewriteRulesSniff` was removed from `WordPressVIPMinimum`, so testable code now moved to RestrictedFunctions group. Also clarifies whether lines should cause Errors, Warnings or Messages, instead of just “Bad.”. See #309. See #187.
Contributor
|
I rebased the PR to take fix the merge conflict due to the removal of FlushRewriteRulesSniff, and I also refreshed the integration test files as overlapping work from #309. I've expanded on the commit messages as well, to give them more context. |
GaryJones
approved these changes
Jan 3, 2019
Contributor
|
Audit updated. See commit messages for Change Log info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
SuperGlobalInputUsagebecauseValidatedSanitizedInputflags the same variables) and their related unit tests to the VIPCS VIP Category:AdminBarRemovalSniffCronIntervalSniffFileSystemWritesDisallowSniffOrderByRandSniffNoPagingSniff(formerly known asPostsPerPagebut WPCS has a sniff now for it)RestrictedFunctionsSniffRestrictedVariablesSniffSessionFunctionsUsageSniffSessionVariableUsageSniffWordPressVIPMinimumruleset to reference the WPCS sniffs (as they are no longer categorized in WPCS VIP):WordPress.Security.ValidatedSanitizedInputWordPress.Security.PluginMenuSlugWordPress.WP.PostsPerPageWordPress.WP.TimezoneChangeWordPress.DB.DirectDatabaseQueryWordPress.DB.SlowDBQueryWordPress.VIPreferences in the rulesets to useWordPressVIPMinimum.In short, it fixes #298 and resolves #187 as well.