-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Change the property name in the MinimumWPVersionTrait trait #2113
Comments
I fully support this proposal. What about naming it Historical perspective:
|
I'm happy with |
Yeah, And since it's a major change we would denote what was changed in the changelog ofc 🙂 |
I'll prepare a PR for this to be pulled after PR #2112 has been merged (and will add information about the change to the WIP upgrade guides and such which I have locally). |
👉🏻 This will also need a change in the Wiki. Linking to #1917 for visibility. |
Is your feature request related to a problem?
In the
MinimumWPVersionTrait
trait, we have a public property that can be referenced in the sniffs, called$minimum_supported_version
. However, the CLI argument for setting the minimum supported WP version is namedminimum_supported_wp_version
.WordPress-Coding-Standards/WordPress/Helpers/MinimumWPVersionTrait.php
Line 71 in 9544c7e
And that can cause some confusion when writing sniffs - in the tests and in the sniffs we are using one naming (
minimum_supported_version
), and when the property should be consumed, either via CLI, or via ruleset, we need to use the other name (minimum_supported_wp_version
):or
Describe the solution you'd like
The solution would be to change this property in the trait to be named
$minimum_supported_wp_version
. All the sniffs consuming this trait would be affected, and the tests as well, but since we would release this in the 3.0.0 version, this is an allowed BC break.The text was updated successfully, but these errors were encountered: