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

Add version utilities #817

Merged
merged 8 commits into from
Dec 5, 2024
Merged

Add version utilities #817

merged 8 commits into from
Dec 5, 2024

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar commented Dec 3, 2024

Add version utilities:

  • Add get_wordpress_stable_version() similar to that helper method in Plugin_Readme_Check class
  • New methods to fetch version informations
    • get_wordpress_latest_version()
  • Added Version_Utils_Tests unit test class

@ernilambar ernilambar added the Infrastructure Issues for the overall plugin infrastructure label Dec 3, 2024
@ernilambar ernilambar marked this pull request as ready for review December 3, 2024 09:43
Copy link

github-actions bot commented Dec 3, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ernilambar <rabmalin@git.wordpress.org>
Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ernilambar
Copy link
Member Author

ernilambar commented Dec 3, 2024

On second thought, this could be alternative naming convention:

  • get_wordpress_stable_version()
  • get_wordpress_latest_version()
  • get_php_required_version()
  • get_php_recommended_version()
  • get_mysql_required_version()

@ernilambar
Copy link
Member Author

ernilambar commented Dec 4, 2024

PR updated with new naming pattern.

Also added get_wordpress_relative_major_version() method to find relative WP major version.

@davidperezgar davidperezgar merged commit f928fbb into trunk Dec 5, 2024
25 checks passed
@davidperezgar davidperezgar deleted the add-version-utils branch December 5, 2024 18:45
@davidperezgar davidperezgar added this to the 1.3.1 milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall plugin infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants