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 matches the behavior of WordPress core which will refuse to install a plugin if the local copy of WordPress or PHP don't meet the minimum requirements for the most recent version as listed by the plugin authors.
Unfortunately the api is limited and only provides these requirement details for the most recent version, so it isn't possible to find an older version that might work. As a compromise, this code doesn't check requirements if a user provides a specific --version since we can't know the requirements for anything other than the latest version and assume if somebody specifies a version they know it will work or want to try anyway.
This matches the behavior of WordPress core which will refuse to install
a plugin if the local copy of WordPress or PHP don't meet the minimum
requirements for the most recent version as listed by the plugin
authors.
Unfortunately the api is limited and only provides these requirement
details for the most recent version, so it isn't possible to find an
older version that might work. As a compromise, this code doesn't check
requirements if a user provides a specific --version since we can't know
the requirements for anything other than the latest version and assume
if somebody specifies a version they know it will work or want to try
anyway.
Interesting, this now reveals issues with existing tests like:
Warning: akismet: This plugin does not work with your version of WordPress. Minimum WordPress requirement is 5.8
When running the WordPress 3.7 test. Several similar errors in the WordPress 6.2 test as many of the plugins we use for the tests actually require newer versions of WordPress.
If the PR seems OK otherwise I can fix those, either by finding new plugins or just by specifying a specific plugin version for those tests (which bypasses this new check).
Should we perhaps add an --ignore-requirements arg? As long as you don't activate the plugin/theme, installing an incompatible version is not a problem.
This will also be relevant for #407 (plugin dependencies).
Should we perhaps add an --ignore-requirements arg? As long as you don't activate the plugin/theme, installing an incompatible version is not a problem.
This will also be relevant for #407 (plugin dependencies).
Sounds good, I added that arg. The only thing left is what to do about failing tests on WP 3.7 and WP 6.2. They are all for the same reason that the plugins we use for these tests have a higher WP requirement and now wp plugin/theme install fails with an appropriate error.
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.
This matches the behavior of WordPress core which will refuse to install a plugin if the local copy of WordPress or PHP don't meet the minimum requirements for the most recent version as listed by the plugin authors.
Unfortunately the api is limited and only provides these requirement details for the most recent version, so it isn't possible to find an older version that might work. As a compromise, this code doesn't check requirements if a user provides a specific
--version
since we can't know the requirements for anything other than the latest version and assume if somebody specifies a version they know it will work or want to try anyway.