Skip to content

@wp-playground/cli minor version query resolves to latest patch version #2749

@stokesman

Description

@stokesman

While --wp=6.8 resolving to “6.8.3” is likely intentional, it makes it impossible to run WP 6.8 (or other minor releases) without providing a URL.

Of course, trying --wp=6.8.0 doesn't work because that's not how the 6.8 zip is named.

The relevant part of resolveWordPressRelease:

} else if (
apiVersion.version.substring(0, versionQuery.length) ===
versionQuery
) {
return {
releaseUrl: apiVersion.download,
version: apiVersion.version,
source: 'api',
};

It's easy enough to make this keep the version as specified but that loses the convenience of resolving to the latest patch release.

I propose something like one of the following:

  1. Support a wildcard like --wp=6.8.x for getting the latest patch version and changing current resolution behavior so 6.8 resolves to exactly that.
  2. Support a special format like --wp=6.8! to keep current resolution behavior and allow a way to specify unpatched minor version.

Thank you for considering this matter 🙇.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions