-
Notifications
You must be signed in to change notification settings - Fork 60
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
Run checks in the context of the minimum WP version supported by a plugin #384
Conversation
…lugin under test.
Thanks @dd32. This does seem like something the Plugin Check plugin should account for. It would be great to get some tests added for this functionality if you have time. Additionally, it seems this issue currently effects the current version of the plugin published to the .org repo, which is currently in the |
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.
Thanks @dd32, great catch! I left some feedback below.
Feel free to add them, as I said, I couldn't figure out how to in the overcomplicated abstractions.
Probably, but I don't think that's a priority, since AFAIK the legacy version should be abandoned in its entirety based on how things have been moving |
Co-authored-by: Felix Arntz <[email protected]>
…e time per class instance.
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.
Thanks @dd32!
Some PHPCS rules are WordPress version dependent, only being triggered for older (or newer) versions of WordPress.
One such rule is this, which is triggered unless the minimum wp is set to 6.2:
WPCS allows setting the minimum required WP version, which this PR implements
https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#setting-minimum-supported-wp-version-from-the-command-line-wordpresscs-0140
I've not added a unit test for this, as I wasn't immediately able to figure out how to do so, but this PR works in my initial testing.