You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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?
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.
You mean similar to wp-cli/extension-command#440 where we say that a specific version is unavailable/incompatible?
Should we confirm adding something to the release process first?
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.
You mean similar to wp-cli/extension-command#440 where we say that a specific version is unavailable/incompatible?
Yea something similar to that. Really just a message that lets you know that wp cli update is holding something back. Otherwise you might think that by showing no update available you are on using the latest version (which was part of the problem with themes and plugins -- not knowing that new versions are available and thinking you are up to date when it says no updates available).
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 wp cli update this would be something for wp cli check-update.
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:
$ wp cli check-update
+-----------+-------------+-------------------------------------------------------------------------------------+-------------+---------------+
| version | update_type | package_url | status | requires_php |
+-----------+-------------+-------------------------------------------------------------------------------------+-------------+---------------+
| 999.9.9 | major | https://github.com/wp-cli/wp-cli/releases/download/v999.9.9/wp-cli-999.9.9.phar | unavailable | 123.4.5 |
| 777.7.7 | major | https://github.com/wp-cli/wp-cli/releases/download/v777.7.7/wp-cli-777.7.7.phar | available | 5.6.0 |
+-----------+-------------+-------------------------------------------------------------------------------------+-------------+---------------+
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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