Skip to content
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

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Remove hard-coded WP latest version check #28

merged 6 commits into from
Dec 12, 2023

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Dec 8, 2023

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 the tmp directory into the tests 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.

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
@jazzsequence jazzsequence requested a review from a team as a code owner December 8, 2023 22:24
@jazzsequence
Copy link
Contributor Author

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

Copy link
Member

@pwtyler pwtyler left a 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?

Comment on lines +48 to +50
<exclude name="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown">
<exclude-pattern>*/*</exclude-pattern>
</exclude>
Copy link
Member

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?

@jazzsequence
Copy link
Contributor Author

Noting here that there's no need to create a release for this update since it's only affecting testing.

@jazzsequence jazzsequence merged commit 133425b into main Dec 12, 2023
4 checks passed
@jazzsequence jazzsequence deleted the 6.4.2-bump branch December 12, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants