Closed dingo-d closed 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.
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).
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 withWordPress.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.
@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.
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
@dingo-d Thanks for removing those. Once the build passes, I'll merge this.
I like the idea, let me open up a new PR for this :+1: