WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
207 stars 38 forks source link

Bump the WPCS version #239

Closed dingo-d closed 4 years ago

dingo-d commented 4 years ago

I like the idea, let me open up a new PR for this :+1:

jrfnl commented 4 years ago

I like the idea, let me open up a new PR for this +1

:+1: I suggest for the update related to the deprecated sniff to go in this PR though as the old sniff will start throwing deprecation notices as of WPCS 2.2.0.

dingo-d commented 4 years ago

I suggest for the update related to the deprecated sniff to go in this PR though

You mean the WordPress.WP.TimezoneChange sniff? I should replace it with WordPress.DateTime.RestrictedFunctions in the ruleset (from what I've read in the changelog).

jrfnl commented 4 years ago

I suggest for the update related to the deprecated sniff to go in this PR though

You mean the WordPress.WP.TimezoneChange sniff? I should replace it with WordPress.DateTime.RestrictedFunctions in the ruleset (from what I've read in the changelog).

It should (for now) be replaced by WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set.

The WordPress.DateTime.RestrictedFunctions sniff contains a second function group, so we need to make sure that one is not (yet) included.

Replacing the old sniff with the new code is one thing. Adding additional checks is another.

jrfnl commented 4 years ago

@dingo-d Is it me or did you add additional new sniffs to this PR now anyway ? Those are new decision points and would be a reason to reject this PR.

dingo-d commented 4 years ago

Oh, I thought that I'd put the new sniffs with the deprecation ones since they all come with the new version of the WPCS 🤷‍♂

I can remove them and open a new PR with those changes

jrfnl commented 4 years ago

@dingo-d Thanks for removing those. Once the build passes, I'll merge this.