-
Notifications
You must be signed in to change notification settings - Fork 19
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
Upgrade wpcs #314
base: master
Are you sure you want to change the base?
Upgrade wpcs #314
Conversation
Also upgrades to vipcs 3.0 for necessary changes there.
Looks like the duplicate ignore checks may not be working as I think |
These sniffs have been renamed upstream; I'm updating the ignore refernces to them here to avoid errors parsing the HM ruleset.
`customPropertyWhitelist` has been renamed to `allowed_custom_properties`.
@@ -14,6 +14,7 @@ | |||
* | |||
* @see https://github.com/WordPress/WordPress-Coding-Standards/issues/1864 | |||
*/ | |||
#[AllowDynamicProperties] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goldenapples Is this necessary? Seems like we should know the properties being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Yeah, this was pretty hacky.
The problem is that $printingFunctions
is changed in the parent class from protected to private, so trying to unset items from $this->printingFunctions
here is not going to work, and will trigger an accessing dynamic properties warning.
coding-standards/HM/Sniffs/Security/EscapeOutputSniff.php
Lines 54 to 56 in c5f69a8
foreach ( $this->hmSafePrintingFunctions as $function => $val ) { | |
unset( $this->printingFunctions[ $function ] ); | |
} |
This annotation silences the dynamic properties deprecation warning. It does not, however, make the code here work to ignore the safe printing functions.
@rmccue @goldenapples is there work still pending on this? It's unclear what the status of the PR is currently, from first glances it looks like Travis CI is the blocker. This is causing an issue on a client repo so I'd like to scope out what needs doing so we can action it |
Fixes #313.
Have not exhaustively checked all the differences here yet to see what breaks.