Check PHP version requirement in update check by swissspidy · Pull Request #6037 · wp-cli/wp-cli

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