-
Notifications
You must be signed in to change notification settings - Fork 994
Check PHP version requirement in update check #6037
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
Conversation
70bee99
to
f00f441
Compare
This looks ok to me -- do we want to also notify users that it has skipped an update due to incompatible PHP requirements? I'm ok if that is another PR too. Should we confirm adding something to the release process first? |
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.
Code and logic seem good to me if we decide to go with this approach
You mean similar to wp-cli/extension-command#440 where we say that a specific version is unavailable/incompatible?
Good point. This will indeed require a slight addition to the release process, as this JSON file will need to be uploaded to every GitHub release going forward. Unless we find a better way to do this of course. I hope @schlessera can share his thoughts soon on that. |
Yea something similar to that. Really just a message that lets you know that Overall it is much less of an issue with a tool like wp-cli because there is just one thing to keep track of and most people are probably following it upstream as well, so I don't think its the same level of problem as with themes/plugins and more of a nice to have at some point. |
Good suggestion 👍 If not for In the future this could also be used for other things like versions that are not offered because of known security issues or so, so maybe we can incorporate that logic already. |
I just pushed changes to a) check the PHP version required by a nightly build as well and b) update the table's output as per @mrsdizzie's suggestion. Example:
|
Depends on #6036 and wp-cli/wp-cli-tests#235 for HTTP request mocking in tests.
This attempts to address #6004 by checking for a
wp-cli-x.x.x.manifest.json
file that should be attached to releases going forward. This file can contain things like PHP version requirements and potentially even other metadata (e.g. some update notice, security info, contributor list, etc.).A release with an incompatible PHP version requirement is skipped by
wp cli check-update
.Also adds sha512 hash validation in addition to the md5 one.
Tests are all passing except the known failures on PHP 5.6, see #6018