WordPress / WordPress/performance

Implement sanity checks in `since`, `readme`, and `versions` commands

Open
#1,444 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement Infrastructure
Dominant language
PHP
Stars
461
Forks
165
Avg merge
11h 12m
Merged PRs (30d)
28

Description

Over the past few months, several enhancements have been implemented to make the since, readme, and versions commands more intelligent so that they can automatically determine the relevant versions rather than requiring them as arguments, making these commands easier to use.

A potential downside of the way this currently works is that it can lead to errors, because the person running the command is no longer explicitly required to think about what the versions they want to prepare the code for actually are. For instance, you could run the since command anytime, leading to @since annotations in the new code being for a version that has already been released.

This issue proposes adding sanity checks to the version detection done by those command scripts. It should check to ensure that the version detected locally is not already available in WordPress.org, effectively leading to a more explicit requirement that the commands must only be used once the version has been bumped to the next version in plugin main file and readme.

More concretely, I'm proposing something along the lines of:

  1. After parsing the version from plugin main file / readme, check wordpress.org for that plugin.
  2. If this version is already released, skip running the process for said plugin, and emit a log that indicates that.
  3. If the version is not already released (including if the entire plugin is new), run the process for said plugin as usual.

This would give us peace of mind that we don't accidentally provide incorrect since annotations or create incorrect changelogs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the since, readme, and versions command scripts and their existing local version-parsing flow. Check the detected plugin version against WordPress.org, then verify that released versions are skipped with a log while unreleased and new plugins continue processing as usual.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.