-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove hard-coded WP latest version check #28
Conversation
this way we can use that file to validate against the version of WP that WP is reporting for itself and remove the hard-coded versions
Linting is failing due to changes in PHP (or WP) CS relating to this sniff called out in our WP Coding Standards: https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards/blob/main/Pantheon-WP-Minimum/ruleset.xml#L70C20-L70C45 That will need to be addressed separate from this PR |
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.
lgtm but can we back off the scope of the exclusion?
<exclude name="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown"> | ||
<exclude-pattern>*/*</exclude-pattern> | ||
</exclude> |
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.
Assuming this is thrown by something in the test, can we exclude there or only for tests, rather than globally?
Noting here that there's no need to create a release for this update since it's only affecting testing. |
This pull request updates the WP version handling and testing in the codebase. It includes the following changes:
Copies the
wp-latest.json
file from thetmp
directory into thetests
directory. This allows us to validate against the version of WP that WP is reporting for itself and remove the hard-coded versions.Adds a helper method that gets the WP version from
wp-latest.json
.Uses the version stored in
wp-latest.json
for testing.These changes improve the accuracy and flexibility of WP version handling in the codebase.
This will fix the currently failing tests.